SQL Error #1366 when importing
| User, date | Message |
|---|---|
|
Written by samurai
4 months ago Category: Import/Export 9 posts since Sat, 19 Jan 13 |
I have a table created with: CREATE TABLE names ( Then when I try to import a TSV file, the first few lines are...(id and name are separated by \t) 1 Barsotti, Marcel When I try to import via it gives me an error: SQL Error (1366): Incorrect integer value: '1' for column 'id' at row 1 I have the import options configured as: Fields terminated by \t Lines terminated by \n (I left the other two options blank) Curiously I didn't have a problem with another table with the exact same id type I've also tried changing the id type to INT instead of BIGINT |
|
Written by samurai
4 months ago 9 posts since Sat, 19 Jan 13 |
I ran this in SQLyog and it showed the same error as a warning but then completed the import but set the id for first row to 0 next one to 2 then 3 and so on. So I know the problem is only with the id value of the first line. |
|
Written by kalvaro
4 months ago 440 posts since Thu, 29 Nov 07 |
It's possible that you saved the file as UTF-8 with BOM. If that's the case, just change your editor settings to omit the BOM (it isn't mandatory and most apps cannot handle it). |
|
Please login to leave a reply, or register at first. |