March 21, 2012 at 2:25 pm
We are running SQL Server 2000 at multiple locations and we are trying to store english, spanish, and french words in the same database/table/column. Right now we have the columns at native character data type but it is still looking like it is not storing properly. I am not sure. How can we get around this issue?
March 21, 2012 at 2:42 pm
all the code inserting the data has to use the same datatype : NVARCHAR or NCHAR.
code as simple looking as
try this code example out and see what happens if you mix varchar and nvarchar implicit conversion into the mix:
declare @var varchar(10),
@nvar nvarchar(10)
SELECT @var = '??/??' ,@nvar = '??/??'
SELECT @var,@nvar
SELECT @var = N'??/??' ,@nvar = N'??/??'
SELECT @var,@nvar
Lowell
March 22, 2012 at 7:45 am
ok. thanks. I have another question, we are using bulk insert to load data from csv into sql server. when loading the special characters are lost? Do you know what would be causing the issue?
March 22, 2012 at 8:01 am
take a look at this books online item about using native mode to avoid dataconversions...it's just a -N flag, but it's important to understand, it might be what is affecting your data, if the destination columns are NVARCHAR/NCHAR:
http://msdn.microsoft.com/en-us/library/ms189941.aspx
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply