views:

43

answers:

1

I'm running this query:

LOAD DATA INFILE 'SomePath' INTO TABLE SomeTable 
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' 
(column1,column2,@Column3Value) 
SET column3 = CAST(@Column3Value AS UNSIGNED);

I'm using the @Column3Value param because this field is a bit type field and this is the only way to do a loading from a file to this type of field. This query works fine in MySQL Query Browser.

The problem is when I run this query from my .net application using the .net connector. I get an error that I'm not supplying the @Column3Value parameter, but the thing is that I shouldn't supply anything. How can I tell the query that @Column3Value is not an in parameter?

any suggestions?

A: 

the at symbol is considered a bound parameter in some interfaces. you can escape it with a backslash (\), but make sure the backslash is preserved when passed to the underlying query function and not lost...

jspcal
That's what i tried now and still getting the same error :LOAD DATA INFILE 'SomePath' INTO TABLE SomeTable FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' (column1,column2,\@Column3Value) SET column3 = CAST(\@Column3Value AS UNSIGNED);
Liron