Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Bulk Insert fails with the error "Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 4 (ContactID).".

$
0
0

Bulk Insert fails with the error '"Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 4 (ContactID)'

Destination table structure as below

CREATE TABLE DataCheck
(
FirstName VARCHAR(50),
MiddleName VARCHAR(50),
LastName VARCHAR(50),
ContactID INT
)

Sample data in the flat file

FirstName,MiddleName,LastName,ContactID
a,b,a,1
a,s,e,2
d,s,w,3
g,s,e,4

Following settings i have done using bulk insert task

In connection below options are used for bulk insert

Destination table :DataCheck

RowDelimiter:{CR}{LF}

ColumnDelimiter:Comma(,)

FileConnection:DataCheck.txt

When i run the bulk insert task all the four rows are inserted but task fails with the error error message

'"Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 4 (ContactID)'

Very strange behavior.I prefer to work with Execute SQL task or some other means for bulk insertion of data.I was just having checking

Any particular reason for this failure and how it can be fixed


Smash126



Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>