0

Error Code: 1366. Incorrect integer value: '1' for column 'id' at row 1

I am trying to import a CSV into a empty table and I get the error above.

LOAD DATA INFILE '/var/lib/mysql-files/BusinessList.csv'
INTO TABLE business_list
fields terminated by ','
Lines terminated by '\n';

1,1,1000002,Your Business LLC,RESTAURANT,1241161200000,1238914800000,1241161200000,Application Cancelled,1409,,R,ST,101,Your City,Your State,99999,2814,,H,ST,,Your City,Your State,99999,Phone,John,Smith,BIA

There is roughly 98,000 rows in the CSV. My ID column is not set to AUTO_INCREMENT.

Where is it getting '1' from? I opened the csv in Sublime Text and Notepad++ and i don't see that.

Devon Quick
  • 348
  • 1
  • 17
  • You need to open the file in a text editor and save it as UTF-8 **without BOM**. – Álvaro González Sep 14 '18 at 15:48
  • so i tried that and I still get a error. Error Code: 1366. Incorrect integer value: '' for column 'BusinessCloseDate' at row 3 – Devon Quick Sep 14 '18 at 15:59
  • Thank you for reporting back. If you have another issue and you can't figure out what it is, feel free to ask a new question. Don't forget the share the relevant part of the CSV file as well as the `CREATE TABLE` statement. – Álvaro González Sep 14 '18 at 16:03

0 Answers0