0

I'm trying to import a csv file into a mysql database in Microsoft Mysql Manager. There are about 40,000 records in total and I've already made the database I'm trying to get the data into.

This is the error message that I'm getting:


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

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

Msg 4864, Level 16, State 1, Line 1 Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 3, column 20 (member_id).

....(This carries on for a bit until this) ...

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

Msg 4865, Level 16, State 1, Line 1 Cannot bulk load because the maximum number of errors (10) was exceeded. Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.

Msg 7330, Level 16, State 2, Line 1 Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".


How can I properly import a csv file into mysql using the microsoft mysql manager? I've tried using a BULK INSERT which resulted in the above error. I've also tried using LOAD DATE LOCAL to no success. Does anyone have any idea what the issue might be?

Thank you for your help!

2 Answers2

0

The errors look pretty informative to me. I would check row 1 column 9 and look for an invalid character for starters.

Tony
  • 801
  • 1
  • 7
  • 22
  • The columns in question only contain letters and/or numbers and the data type of the field is a VARCHAR in the table that I built out. Was there something I overlooked in the creation process perhaps? – Jason Fox Oct 09 '13 at 13:41
0

What I will typically do, until I can get it refined, is start out with all CHAR(X) fields to get the data in, then you can run some queries to see what the data looks like for each field. The errors are telling you where the issue is. You can either fix them, or keep them as characters, instead of converting them during the BULK command.

Steve
  • 5,585
  • 2
  • 18
  • 32