I am working with MySQL 8.0 through MySQL Workbench on a Windows machine.
I am having a huge amount of problems when importing an Excel file into a MySQL database.
I have received the data in the form of an Excel spreadsheet. As I have read that using the CSV format can sometimes cause problems, I have saved the spreadsheet as a text file delimited by tabs. I have created a table in MySQL Workbench according to the fields of the spreadsheet and everything is ready for import. My problem is when I write the following code in MySQL Workbench:
LOAD DATA DATA & # 39; The / path / to / my / file.txt & # 39; ON THE TABLE my_table FIELDS TERMINATED BY & # 39; t & # 39; CLOSED BY & # 39; "& # 39; LINES FINISHED BY & # 39; n & # 39; IGNORE 1 ROWS
I receive errors about incorrect values. Some of the rows have empty spaces (without values) or even a single period "." to denote that there is no value for that position. Depending on the column, it may be of the Date or Int type. I have searched extensively for advice on the subject. The first response on this page seemed hopeful, but after implementing a copy of the solution, I received an error of the type: "Error code: 1366. Incorrect integer value: & # 39; & # 39; for column & # 39 ; abs_2012 & # 39; in row 1.
abs_2012 is of type Int and the row the value of one is an empty space. What is particularly strange is that abs_2012 is the last column of about 30 I have not received any errors about the previous columns.
Does anyone have any ideas at all?
Thank you very much in advance