Hi,
I have a csv file which I am using to populate my table … the file looks like this
This is the data, I will ignore this line when inserting
john, smith, 25
mike, jones, 19
kelly, smith, 22
This line I don’t want to add
I use the following to load my data …
LOAD DATA INFILE 'myfile.csv'
INTO TABLE mytable
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\\r\
'
IGNORE 1 LINES;
All works good, but is there any way to IGNORE the LAST LINE ‘This line I don’t want to add’ ???
Thanks