Here is the SQL query I have so far:
LOAD DATA INFILE 'filename.csv'
INTO TABLE zt_accubid
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 4 LINES
I need to be able to end the process once a field with value="xyz" is encountered.
Is this possible?
LOAD DATA INFILEhas no such option. There are a couple of workaraounds, thoughLOAD DATAinside a transcation, you can use a unique key as a stopper.LOAD DATAinto an interims table, then useINSERT INTO ... SELECTto move only the relevant data into your final table