Below is my code code and is wrong for MySQL. @Path not be allowed variable with syntax "LOAD DATA INFILE" and I don't know exactly path + filename.
Do you have any idea how to solve this issue?
SET @Path = CONCAT(sysf_Get_Options('DRIVE'),sysf_Get_Options('PATH_SAP_FILE'),'277.txt');
LOAD DATA INFILE @Path
INTO TABLE SAP_TMP
LINES TERMINATED BY '\r\n'
(@var1)
SET txt = SP_INSERT_ROW_CONTRACTS(@var1)
;
http://dev.mysql.com/doc/refman/5.6/en/load-data.html says:
The file name must be given as a literal string.
So you can't use a variable for the path. You have to code a literal, quoted string into the statement before it is parsed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With