Skip to content
Advertisement

Bulk load data conversion error (truncation)

I am getting this error

here is the csv…it only has one row

here is my bulk insert statement…

The problem is most of the time it works great but in some situations (this being one of them) I get the errors

ANy ideas on what is causing this record to have this error

Advertisement

Answer

It’s picking up the commas within the comments field as delimiters, because the delimiters are not consistent. The best solution is to insure that all fields are wrapped with double quotes and set FIELDTERMINATOR to '","'. Alternately, replace the commas with something unlikely to be in the comments (like ~) and set FIELDTERMINATOR = '~'.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement