Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Sql Server 2000 - Special characters - High Priority Expand / Collapse
Author
Message
Posted Wednesday, March 21, 2012 2:25 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 22, 2012 8:16 AM
Points: 2, Visits: 3
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?
Post #1270495
Posted Wednesday, March 21, 2012 2:42 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:40 PM
Points: 12,897, Visits: 32,105
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1270503
Posted Thursday, March 22, 2012 7:45 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 22, 2012 8:16 AM
Points: 2, Visits: 3
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?
Post #1270855
Posted Thursday, March 22, 2012 8:01 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:40 PM
Points: 12,897, Visits: 32,105
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1270870
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse