Questions tagged [nvarchar]
Variable-length character data type in Transact-SQL.
nvarchar
489
questions
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 ...
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 ...
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 >...
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 ...
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. ...
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 ...
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 ...
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 ...
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);
...
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 ...
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 ...
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 ...
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 &...
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 ...
-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 ...