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
-1
votes
1 answer

When calling a stored procedure with ADO.NET, how do I tell what parameter types the database actually used?

I have a stored procedure call in C#. It uses ADO.NET to call the stored procedure that is on my SQL Server. Despite knowing that one of the parameters of the stored procedure on the server is VARCHAR(120), I used AddWithValue to add it to my…
J. Mini
  • 1,868
  • 1
  • 9
  • 38
-1
votes
1 answer

Conversion failed when converting the NVARCHAR to BIT

Trying to get some clarification as to why this error is occurring. I think it may have something to do with my input data having NULL values but every example I've searched for doesn't really suit my needs. This is the error I am…
-1
votes
2 answers

Operand Datatype nvarchar is invalid for avg operator

I need to find the average of this column named "Edges". The kind of values in there are like follows: (NOTE: There are a bunch of NULL as well) EDGES 1. 1,362,797 2. 204,919 3. 26,138 948,570 4. 111,471 5,858 I have tried running the query…
-1
votes
2 answers

Varchar to nvarchar without changing length

I have this table that stores an id for each row in sub_id column of type varchar(255), sql server. Other columns store unicode thus those are nvarchar. Now I have this need to update sub_id to nvarchar for SOME reason. I ran following command: …
pyroCoder
  • 160
  • 2
  • 14
-1
votes
1 answer

Limit Exceed while trying to store a large html text format into nvarchar(MAX) field for product

I'm trying to store product description through tinymce text editor into sql-server. But at the time of insert it thowing error that nvarchar can't converted to bigint. I have taken nvarchar(MAX) for the description field. How can I solve this…
-1
votes
1 answer

Editting database dates from nvarchar to datetime

Basically I have been tasked with editing the company database for dates field known as 'CreateDt'. However the dates with in this field are stored in numerous amounts of formats which need to be converted into one, some examples are shown…
UCDA2919
  • 1
  • 3
-1
votes
2 answers

Convert NVARCHAR DATE to DATETIME using CHARINDEX

I am getting the following error when trying to convert nvarchar column to datetime. Select * from table 1 where convert(datetime, col1) >= '2018-08-29 00:00:00.000' Error message The conversion of a varchar data type to a datetime data type…
-1
votes
1 answer

Changing the data type from NVARCHAR to DECIMAL is not working

I have a calculation, from which I get either ('/') or ('*'). This is saved in the variable "@op". The problem was, that I was not able to do some calculations with that, because of casting problems, so I casted the values together with my value…
malue
  • 59
  • 2
  • 10
-1
votes
1 answer

Foreign language not read correct in SQL

I have raw file with entry in Thai language " Yamato-Esulon (Thailand) Co.,Ltd (โรง 1)' but when i put that on SQL table it changes to 'Yamato-Esulon (Thailand) Co.,Ltd (Ó╣éÓ©úÓ©ç 1)' . I'm using datatype nvarchar(MAX). Has someone come across this…
-1
votes
1 answer

Varchar and int columns join in sql

I tried this query insert into Dimension_DDTU (BI_Id, BI_Name, DBI_Id, dBI_Name) select ds.BI_ID, dvo.name, ds.BI_Id + '' + dm.DBI_Id as DBI_Id, dso.dname from Census.dbo.SMaster sm full outer…
see sharp
  • 79
  • 1
  • 1
  • 9
-1
votes
3 answers

Nvarchar to Date

In my table I have ReportingWeek (Date) eg 2017-03-19 BookedWeek (nvarchar(12) eg 07.2017 I would like to select on rows where the BookedWeek is in the last 17 weeks. Do I need to convert BookedWeek to a date, then query it for last…
Lee S
  • 17
  • 6
-1
votes
2 answers

What is the difference between nvarchar of different number?

I only started learning SQL less than a week ago and I have noticed in SQL Server, string can be of type nvarchar(5) or nvarchar(20) or any other number. I was just wondering what is the difference between nvarchar of different number?
Thor
  • 9,638
  • 15
  • 62
  • 137
-1
votes
1 answer

NVARCHAR to VARCHAR2 insert

I have the following table structure: UDA_ID (NUMBER) Translation (NVARCHAR2) I need to insert in the table UDA_ID (NUMBER) Translation (VARCHAR2) How do i convert NVARCHAR2 to VARCHAR2 ?
Imran Hemani
  • 599
  • 3
  • 12
  • 27
-1
votes
2 answers

Extract string between chars in SQL Server strings

Can some one kindly suggest ways by which I can extract 0459 and 0460 from a string like (&0459&/&0460&)*100 in a SQL Server table? I should be able to pull out two strings sandwiched between two pair of ampersands. Thanks in advance.
VivekDev
  • 20,868
  • 27
  • 132
  • 202
-1
votes
1 answer

SQL Server save brackets in nvarchar for Arabic language

I am using sql server 2008 R2 to store my data. I have a datatable named postMaster where I save all the posts in my organization. All posts have to be described in english and arabic. My problem is with the arabic description of the post My data…
Hilal Al-Rajhi
  • 437
  • 6
  • 25
  • 49