Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Sql Server 2000 - Special characters - High Priority


Sql Server 2000 - Special characters - High Priority

Author
Message
rvattakunnel 62580
rvattakunnel 62580
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
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?
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14957 Visits: 38958
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

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

rvattakunnel 62580
rvattakunnel 62580
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
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?
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14957 Visits: 38958
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

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search