MySQL Forums
Forum List  »  Newbie

Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'for f in 'C:\\Users\\Documents\\TEMP\*.csv' DO LOAD DATA INFILE '"$f"' INTO TABL' at line 1
Posted by: Info question
Date: December 27, 2016 10:17AM

I'm getting above error code for below:Can you let me know where syntax error that needs to be fixed ?

for f in 'C:\\Users\\Documents\\TEMP\*.csv'
DO
LOAD DATA INFILE '"$f"' INTO TABLE TEMP
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES"
DONE"

Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'for f in 'C:\\Users\\Documents\\TEMP\*.csv' DO LOAD DATA INFILE '"$f"' INTO TABL' at line 1

MySQL Query

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.