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

Column level collation to store multi linguage characters. Expand / Collapse
Author
Message
Posted Tuesday, August 14, 2012 3:07 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:23 AM
Points: 5,216, Visits: 5,107
Morning all.

We receive data from a 3rd party, the flat file is correct in that it contains the right characters in the file

Flat file data
Emplea la calculadora como instrumento de exploración y verificación de resultados

Database data
Emplea la calculadora como instrumento de exploración y verificación de resultados

I changed the collation at the column to Latin1_General_BIN and Modern_Spanish_BIN, reimported the data, but still the data is showing with the ó instead of ó (it is also doing it for other characters).

The data that we receive is a mixture of English and Spanish (Mexican).

What would be the best collation for the import so that it stores the ó and not the ó, would of thought a binary collation but doesnt seem that way?

Thanks in advance.

Edit, the column is NVARCHAR already, but the file is not unicode, if I try to change to unicode in the SSIS package it doesnt recognise the columns any more.

Edit 2 - got to be the file not being in unicode, inserted the value manually for a number of collations and came back as it should for all collations tried, now to try and convert the flat file to unicode before import as it is already doing a data conversion on the import and still not generating the right output.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1344581
Posted Tuesday, August 14, 2012 9:09 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:27 PM
Points: 35,216, Visits: 31,673
How are you importing the data? For example, if you're using BULK INSERT, the probable way to fix this is to use the RAW file type which will bring the data in with no conversion.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1345114
Posted Wednesday, August 15, 2012 2:00 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:23 AM
Points: 5,216, Visits: 5,107
The data is inserted via SSIS, we receive around 10 files which are loaded into holding tables and a vary large set of manipulation is run on the data to create the correct data what we need for our apps.

The process is run so infrequently that we have made a decision to download the files before hand, and open / save this file in notepad etc as Unicode then upload it to the servers.

Going to investigate a C# or VB script which will do the conversion for us before it is passed to the data flow task.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1345147
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse