BULK INSERT CODEPAGE -
04-02-2010
, 11:31 AM
In trying to BULK INSERT data with the following statement:
BULK INSERT Ideas
FROM 'C:\ideas.csv'
WITH
(
FIELDTERMINATOR =',',
ROWTERMINATOR ='\r',
MAXERRORS = 1000,
BATCHSIZE = 1
)
from an irregularly formatted csv file I get the following error:
Msg 4864, Level 16, State 1, Procedure ap_IDEAS_BULKINSERT, Line 10
Bulk load data conversion error (type mismatch or invalid character for the
specified codepage) for row 110, column 34 (NOTES).
Not all lines cause errors. It appears those with double quotes within the
text cause problems.
and line on which the error occurs is:
0005,COMPANYA (0005),0005-00000001,Vendor B,Vendor B,Steve
Smith,800-555-1545,10/6/2003,Assorted stuff,Lower cost,Joe Smith,Joe
Smith,10/6/2003,PUR,0,13001.8,0.7,18500,Each,0,0,0,0,0,0,R,N/A,Rejected,9/29/2005,,13005.5,10/6/2003,External,Vendor
B will provide identical lower cost stuff. Additional benefit of developing
Vendor B ordering/inventory program so as to "work around" limitation C.
Thanks, |