Bug #42976 | LOAD DATA INFILE command does not accept file names as variables | ||
---|---|---|---|
Submitted: | 18 Feb 2009 16:15 | Modified: | 18 Feb 2009 19:04 |
Reporter: | Pablo S | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | LOAD DATA INFILE, user defined variables |
[18 Feb 2009 16:15]
Pablo S
[18 Feb 2009 19:04]
Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the original bug instead. Thank you for your interest in MySQL. Duplicate of bug #39115
[24 Jan 2013 13:51]
Pawel Jastrzabek
Hello, I used your above code. I used variable @d2 in the below code to load data from txt file. Set @d1 = 'C:/Users/pjastrzabek/Desktop/MySQL/Avaya/UoL_Poland/'; set @d2 = concat( @d1, 'UoL_Poland_1_20130114.txt'); load data local infile @d2 into table Avaya_test ignore 5 lines (Agent_Name, Login_ID); When I run this cose I received error like below. 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 '@d2 into table test ignore 5 lines (Agent_Name, Login_ID at line 1 I see that the problem is with variable but I do not know how resolve this issue. Thank you for your feedback.