I have a windows csv file containing a list of fileaddresses, each one on a single row.
I must load it by LOAD DATA INFILE into a simple table having just one column.
Using:
SET sql_mode='NO_BACKSLASH_ESCAPES';
LOAD DATA LOCAL INFILE 'C:/searchresult.csv'
INTO TABLE ltable
FIELDS TERMINATED BY '\r\n'
LINES TERMINATED BY '\r\n'
(FILEADDRESS);
And all the ways (combinations of FIELDS and LINES sections, also excluding it/them, and with different termination codes '\n','\r','\r\n','\t') i have tried i was unable to exclude ASCII 13 i've got at the end of each row. Also following the suggestions in
https://dev.mysql.com/doc/refman/5.5/en/load-data.html.
Particurarly, the use of LINES TERMINATED BY '\r\n'
leads to get just a single value imported and consisting in just all the original rows appended each other with a ASCII(13) between each original value.
How can avoid to import that last character?