Sql Server 2000 - Special characters - High Priority

  • 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?

  • 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!

  • 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?

  • 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!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply