MySQL Forums
Forum List  »  Newbie

Re: 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 06:58PM

Hi Peter ,

Does it mean

I can call below only from out side of workbech like placing script on the server and execute some cron job ?

"for %f in (.\*.CSV) DO mysql -u%MYSQLUSER% -p%MYSQLPASS% -AN -e"LOAD DATA INFILE '"%CSVFOLDER%\\%f"' INTO TABLE TEMP FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES"

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.