Questions tagged [nvarchar]

Variable-length character data type in Transact-SQL.

Variable-length character data type in Transact-SQL. More info: https://msdn.microsoft.com/en-us/library/ms186939.aspx.

483 questions
3
votes
2 answers

unique column of type nvarchar

I have a simple table: File: path | deleted | categories | description I want to use the table for a Linq to SQL entity model. On the model, that column path (which is string there, nvarchar in database) can be set as primary key, but this is not…
3
votes
2 answers

Unable to query nVarChar(Max) field in Access 2010

have used Stack Overflow as a resource hundreds of times, but my first time posting a question for some help! I've got a table in SQL Server 2005 which contains 4 nVarChar(Max) fields. I'm trying to pull out the data from an Access (2010) VBA Module…
aldredd
  • 236
  • 1
  • 2
  • 7
3
votes
3 answers

When does the space get allocated

If I declare a column as nvarchar(max), I understand that this will allocate 2Gb of space, but does it actually take the 2Gb, of disk space, straight away once I save the changes to the table? Or, is it that it makes note that this column will…
Neil Knight
  • 47,437
  • 25
  • 129
  • 188
3
votes
3 answers

NVarchar(MAX) for short strings

I am interested is NVarchar(MAX) a good data type is I want to store short unicode strings which are 1-50 characters long, but most of them (more than 90%) are 5-10 characters long? The column will not be used in comparison and ordering queries. It…
zygimantas
2
votes
0 answers

read nvarchar data in gridview

I am Using This Code To Read data from Oracle Database .That Data stored In Oracle is Navarchar2 data type but when It it display in gridview it looks like this. نصرت Ù…Ù†ÙˆÚ©Û HEre is the code I am using to read data Update Protected Sub…
user1103342
  • 113
  • 1
  • 3
  • 8
2
votes
1 answer

Datatype in AdventureWorks database

When I looked at the tables in Adventure works, the design of each columns seems a bit strange. Since AdventureWorks shows industrial standards I want to follow it. In Phone number columns they have given type for the column as…
wackytacky99
  • 614
  • 1
  • 14
  • 33
2
votes
2 answers

How much of a page is occupied by nvarchar(X)?

What are the storage requirements for nvarchar(X)? So for example, if the value in a column is much smaller than X, how much is actually stored in the database page?
Thomas Bratt
  • 48,038
  • 36
  • 121
  • 139
2
votes
1 answer

How to insert data into NVARCHAR2 field with plsql developer?

Oracle version: 11gr2, NLS_CHARACTERSET: WE8MSWIN1252, NLS_NCHAR_CHARACTERSET: AL16UTF16, client NLS_LANG: AMERICAN_AMERICA.WE8MSWIN1252, PL/SQL Developer version: 8.0 I have a table which has a NVARCHAR2 field, I try to execute INSERT statement in…
gfytd
  • 1,747
  • 2
  • 24
  • 47
2
votes
0 answers

Converting nvarchar(255) in SQL Server to varchar in MariaDB?

I am using CData Sync to convert my table in SQL Server to MariaDB. The data type I have for some of my columns (including my primary key) is nvarchar(255) and when I try to convert it using CData sync to a MariaDB table, it throws an error stating:…
2
votes
2 answers

NVARCHAR variable not working in Where clause

In SQL Server (2018 I think? I don't know how to tell) my variable isn't working in WHERE clauses for NVARCHAR. The comparison should return values but it returns nothing. If I just type the declared text in manually it suddenly works and returns…
SandGrug
  • 25
  • 4
2
votes
1 answer

nvarchar column size impact on performance

Possible Duplicate: overstating field size in database design I have a "description" column in one of my tables which as of now I dont know the maximum size of. But I am assuming it should not be greater than 1000 characters. Question: If I make…
stackoverflowuser
  • 22,212
  • 29
  • 67
  • 92
2
votes
1 answer

French Text stored in SQL Server Appears Wrong, how to make it appear correctly

I've got a table that is comprised of the following structure. CREATE TABLE [dbo].[tblData]( [ID] [numeric](18, 0) NOT NULL, [QID] [varchar](25) NOT NULL, [Data] [nvarchar](255) NULL, CONSTRAINT [PK_tblData] PRIMARY KEY CLUSTERED …
Frank V
  • 25,141
  • 34
  • 106
  • 144
2
votes
0 answers

How to index computed json columns properly in Sql server?

I have followed the guidelines on how to index json fields from Microsoft here. Here is an example: ALTER TABLE Sales.SalesOrderHeader ADD vCustomerName AS JSON_VALUE(Info,'$.Customer.Name') CREATE INDEX idx_soh_json_CustomerName ON…
Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207
2
votes
2 answers

Does NVARCHAR(MAX) consume more storage (physical size) than NVARCHAR(N)

In SQL Server, if you create a column of type NVARCHAR(MAX), and populate only 128 characters inside - does it consume more storage than if you'd create it as NVARCHAR(128) - or is it the same size?
ZiGi
  • 81
  • 1
  • 7
2
votes
0 answers

Parameter in linked-server query is converted from varchar to nvarchar, causing index scan and bad performance

We have the following setup: Source server version 12 or 15, collation Latin1_General_CI_AS (in our responsibility, we can change everything here) Linked-server version 13, collation: Latin1_General_CI_AS (not in our responsibility, we cannot…
M T
  • 21
  • 2