I am getting this error
Bulk load data conversion error (truncation) for row 1, column 12 (is_download)
here is the csv...it only has one
This can be solved easily by using the following in your bulk insert:
FORMAT ='CSV'
This takes care of the commas in a string.
Please select this as answer if it helped you.
i had the header as first row. after i removing it, it was fine.
System.Data.SqlClient.SqlException (0x80131904): Bulk load data conversion error (truncation) for row 97, column 33
For the above error, you can check
In addition to Wil's comments, it seems like it is seeing all 12 columns, so it may just be that your rowterminator is incorrect. First, make sure that the program that puts these files together is in fact putting a carriage return at the end of the last line; I've had to correct many programs where this wasn't the case. Once you are sure there is a carriage return there, you may have to experiment to see what type of carriage return it is. Sometimes it is char(10) only, sometimes char(13) only, and sometimes it may have both but be in the wrong order. So experiment with:
ROWTERMINATOR = '\n'
ROWTERMINATOR = '\r'
ROWTERMINATOR = '\n\r'
ROWTERMINATOR = '\r\n'
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 = '~'
.