Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [nvarchar]

Variable-length character data type in Transact-SQL.

0 votes
0 answers
27 views

Issue with Text Display Using json_object and json_arrayagg in Oracle

I'm working with Oracle database where the 'NLS_CHARACTERSET' is set to 'AR8ISO8859P6', and I'm using the 'nvarchar2' datatype for my columns. When I select Kurdish text from my table, it displays ...
Sa_am's user avatar
  • 27
0 votes
0 answers
36 views

XML path into temp table creates a nvarchar column, issues when merging it varchar column

I using SQL Server 2012 and need to use FOR XML PATH to get a comma-separated string for like projects. The query runs and works but when I try to alter #T2, I get an error String or binary data ...
dave82's user avatar
  • 31
1 vote
1 answer
86 views

Read huge nvarchar(max) as UTF-16 stream without saturate memory

I am developing a program that reads text from sql server nvarchar(max) field and needs to write it as UTF-16 text file inside a zip. I cannot load the string contained in the field as it weighs >...
matti157's user avatar
  • 1,288
0 votes
0 answers
12 views

How can I use SQL to find results with a dynamic integer field?

| ID | Status | I am searching a table with a status field that is an integer. I need to find certain values with the dynamic status. The status can be 0 or 0,1 or 1,3 or 0,1,3 etc. I get an error ...
Morgan Woods's user avatar
1 vote
1 answer
121 views

Using nvarchar(max) in Azure stored procedure

We are testing moving from a local MSSQL db to Azure. We have an old ASP classic site which we need to maintain that creates an ADODB command to store email messages using a MSSQL stored procedure. ...
user1480192's user avatar
0 votes
1 answer
129 views

Why do commas take up two bytes?

select datalength(N','), unicode(N',') returns 2 in the first column and 44 in the second. This means that commas take up two bytes, but can be stored using just the number 44. , is in the first 128 ...
J. Mini's user avatar
  • 1,788
0 votes
0 answers
39 views

SSIS data conversion loses extended ASCII

I'm reading from a data source that returns unicode strings, and the output goes into a data conversion transform where I output a "string [DT_STR]" from it as my database is using varchar ...
Gargoyle's user avatar
  • 10k
0 votes
1 answer
204 views

If I call Left([col], x) on an NVARCHAR(max) column, is it always safe to save the output in an NVARCHAR(x) column?

The common misconception that the argument to NVARCHAR(x) is a character count has bitten me many times today. I am asking this question in the interest of exploring the topic further. Consider an ...
J. Mini's user avatar
  • 1,788
0 votes
1 answer
47 views

Procedure can't return large string response(~293 characters)

Below is my stored procedure create or replace PROCEDURE PR_GETECOUNT ( P_YEAR IN NUMBER ,P_RECORDSET OUT NVARCHAR2 ) AS l_r_count varchar2(400); l_v_count varchar2(400); l_e_count varchar2(400); ...
sanjeevRm's user avatar
  • 1,596
1 vote
2 answers
566 views

Updating nvarchar(max) in SQL Server with huge value

I'm trying to manually update a SQL Server column of type nvarchar(max) with a huge JSON parsed as text. It's a simple, straightforward query: UPDATE Books SET Story = '' WHERE Id = 23 The problem ...
Filip5991's user avatar
  • 433
0 votes
0 answers
21 views

JSON string in MS SQL Server is too large to select without CAST ing to XML [duplicate]

We have event data in a log table that is a JSON string of NVARCHAR(MAX) datatype. Some of the strings are too large to SELECT out of the table. But, if we CAST it, we can see the entire value. SELECT ...
Michael's user avatar
  • 339
0 votes
0 answers
61 views

Changing 8 column type of a big table from nvarchar(max) to varchar(x) with EF code Code-first

I have a very big table(T1) with a Tera byte of data in the Prod environment. There are some columns with nvarchar(max) which are such a miss. The table is created by code-first Ef core. Since it is ...
Mahdi Abyaznezhad's user avatar
0 votes
0 answers
61 views

Why does "N" shows up in Excel report from SQL Server data?

I'm modifying a report that uses SQL Server to export data from package software (Yardi Voyager) into an MS Excel template. The data mostly comes over fine. However on a few date fields the letter &...
MaybeWeAreAllRobots's user avatar
0 votes
1 answer
109 views

Specific Effects of using nvarbinary vs nvarchar for storing images

I have seen the statement that if you are storing images in a column in a SQL Server database, you should use varbinary instead of nvarchar. Which makes 100% sense to store binary data as varbinary ...
Dancin Dave's user avatar
-3 votes
1 answer
73 views

Concat and make a string into a date

I have a table where the month and year are separate, and I want to put them together and make the backend format to date. I tried cast/converting but I get an error of "Conversion failed when ...
cardonas's user avatar
  • 109

15 30 50 per page
1
2 3 4 5
33