COLLATION in bulk insert

  • Hi,

    I have a bulk insert statement:

    BULK INSERT DatabaseTMP_CONVERT FROM 'CONVERT.CSV'

    WITH (

    DATAFILETYPE = 'WIDECHAR'

    FIRSTROW = 1,            

    FIELDTERMINATOR = 'COL_SEP',

    ROWTERMINATOR = 'ROW_SEP',        

    CODEPAGE = 'RAW')

    Some fields that are inserted are encrypted using special characters beyond the normal ascii character set. I have a database that has a collation set to Arabic. When the collation is set to arabic the import does not transfer some data across properly.

    When I set the collation to latin on this database, the data comes across correctly. Can someone help me to explain why this is the case?

     

  • I am not sure that changing the database collation is the approach to take. Normally, the database collation is set at a particular collation for a reason!

    Have you tried changing the CODEPAGE option in the BULK INSERT statement to one used by the data stored in the source table? My guess is that it's 850.

    I presume that your character fields in table DatabaseTMP_CONVERT is created with the Latin1 collation?

Viewing 2 posts - 1 through 2 (of 2 total)

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