0

Hi All,

When I run this script using bulk insert i got an error message
but when I try the first 6 records there is no problem.
can anyone give the reason and what is the problem?

Use chrisMartin
Bulk Insert SampleTable_Jonel
FROM 'c:\planning\ProductRecoveryDataFeedytd_3.csv'   --Sheet 1
With
(
DATAFILETYPE = 'char',
FieldTerminator = ',',
CODEPAGE = 'OEM',
KEEPNULLS,
RowTerminator = '\n', FirstRow = 1)

Error message

Msg 4864, Level 16, State 1, Line 2
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 7, column 11 (InsertDate).
Msg 4864, Level 16, State 1, Line 2
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 11, column 11 (InsertDate).

thanks you.

jov

5
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by Eagletalon
0

is it possible the data contains characters that would "break" the insert? eg. a VARCHAR value like: 'Stan's bbq'

0

may possible InsertDate is null in Excel file, validate Isnull(InsertDate) then set some date in query

0

Could you possibly provide some example data? perhaps the record that "breaks" the insert? (you mentioned the first 6 works, perhaps nr 7 is a problem?)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.