I'm trying to import a CSV files into my MySQL table using the following query:
LOAD DATA INFILE 'C:\\machines.csv'
INTO TABLE `machines`
CHARACTER SET latin1
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 0 LINES;
However it give the following error
1406- Data too long for column 'technicalInfo' at row 10334
It seems that the issue is that the row contains a ⌀ character in the technicalInfo column.
Is it possible to remove/replace this character within the query?
(N.B. Obviously another solution would be to remove it from the csv file itself. The problem is that I am likely to be importing different versions of this file multiple times every day, so I'd rather build it in to the query.)
mysqlimportutility?character set` to utf-8` help?