SQL Server Performance

Extract Data form an nvarchar colum that contains strings with diffrent collation

Discussion in 'SQL Server 2008 General DBA Questions' started by AMOURGH, Jul 11, 2009.

  1. AMOURGH Member

    Hi guys, i have a table : Create Table MyTabele ( Id INT indentity(1,1), FirstName nvarchar(50) ) The database collation is French_CI_AS. Usually i upload data to this table that have FirstName as Latin and it works when i check the table with a select. Now,i have uploaded data from an excel file to this table. This time the FirstName Column is Japanese. To check i have done a select and the result is: Id FirstName 2337 ??? 2338 ???? Any idea how to avoid this?Thanks,Rachid
  2. moh_hassan20 New Member

    it seems that client codePage is different than server
    do you import the data using SSIS ? in that case you should map char correctly.
    to isolate the problem, try reading from excel to avoid character mapping:
    select * from
    OPENROWSET ('Microsoft.Jet.OLEDB.4.0',
    'Excel 8.0;Database=c:myfile.xls;',
    'SELECT * FROM [Sheet1$]')
    it should be displayed correctly
  3. satya Moderator

    If the source data is constant in terms of getting same values with different UNICODE then you could even create the COLUMN with supporting collation setting, refer to Books ONline about the UNICODE management.

Share This Page