Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2011-05-04 : 18:56:05
|
Hello,I am trying to bulk insert records in a SQL table from a CSV file:use TestgoSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGODELETE FROM dbo.SubscribersBEGIN TRANSACTIONBEGIN TRYBULK INSERT dbo.Subscribers FROM 'C:\Subscribers.csv' WITH (CODEPAGE = 'RAW', FIELDTERMINATOR = ';', ROWTERMINATOR = '\n', ROWS_PER_BATCH = 10000, TABLOCK)COMMIT TRANSACTIONEND TRYBEGIN CATCHROLLBACK TRANSACTIONEND CATCHIt works fine but in NAME column I get strange characters, different from the source in the CSV file.For example:Mário becomes M+írioI have no idea what else to try. Could someone please help me out?It is urgent.Thank You,Miguel |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2011-05-04 : 19:40:09
|
Are you using Unicode characters? Any chance that there is a mismatch in the collation?=======================================Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986) |
|
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2011-05-04 : 19:54:33
|
How can I check the collation?I really don't know what is going on. I tried everything I could find online and wasn't able to solve it. |
|
|
|
|
|