Reputation: 11
Im trying to load some information into province_state table.
LOAD DATA INFILE '/tmp/province.txt'
INTO TABLE province_state
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r\n';
It give me this error:
ERROR 1366 (HY000): Incorrect integer value: '' for column 'province_state_id' at row 9
. But I only hace 8 rows what could be happening?
Upvotes: 0
Views: 1141
Reputation: 1020
Isn't this because mysql setting when you want to insert a new position without having all data?
You can configure your mysql to set NULL if you don't send values. temporary solution (until you restart the server): SET @@GLOBAL.sql_mode= 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
or you can set it in you my.ini file. Here are mode details: http://webnetkit.com/error-sqlstatehy000-general-error-1366-incorrect-integer-value-for-column/
Upvotes: 1