Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bulk insert

Status
Not open for further replies.

cmsbuffet

Programmer
Feb 3, 2009
173
CA
When I execute this code
Code:
USE Zipcodes2
GO
BULK INSERT ZipCodes4
FROM 'd:\cmsbuffet\correct_database.csv'
WITH (FIELDTERMINATOR=';', ROWTERMINATOR = '\n')
I get this error, what does it mean?
Code:
Bulk load: DataFileType was incorrectly specified as char. DataFileType will be assumed to be widechar because the data file has a Unicode signature.
Bulk load: DataFileType was incorrectly specified as char. DataFileType will be assumed to be widechar because the data file has a Unicode signature.
Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 45235, column 5 (StateAbbreviation).
Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 45236, column 5 (StateAbbreviation).
Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 45237, column 5 (StateAbbreviation).
Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 45238, column 5 (StateAbbreviation).
Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 45239, column 5 (StateAbbreviation).
Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 45240, column 5 (StateAbbreviation).
 
Apparently, it was a very interesting situation. The bulk transfer was occurring, but it wasn't adjusted for the EOF. So I got 180,000 records in database before I realized what was going on. Now I recreated the table, it is supposed to have 45234 rows. Unfortunately, it holds now 45237 rows. Is it OK? How do I fix it? Thanks.
 
Does anyone know how to clean up the code, so that it won't produce any errors, and which would be EOF-compliant?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top