Issue with database queries

“LOAD DATA LOCAL INFILE ‘(filepath)’ INTO TABLE test FIELDS TERMINATED BY ‘,’ enclosed by ’ " ’ LINES TERMINATED BY ‘\r\n’ ignore 1 lines (id , name, @var1) set date = STR_TO_DATE(@var1, ‘%Y-%m-%d’);”

while trying to execute this query, UIPath is assuming the double qoutes (“) next to ‘enclosed by’ as the end of the query and throwing an error which says,end of expression expected. Kindly help me on how I can resolve this. I tried escaping ’ /” ’ which didn’t work.

Thank you
Amitha

Did you try replacing with char(34)?

This is again throwing an error that says, “fatal error occured while executing the query.”

I think its chr(34) in vb.net. Give a try.

“LOAD DATA LOCAL INFILE ‘(File Path)’ INTO TABLE test FIELDS TERMINATED BY ‘,’ enclosed by '”+chr(34)+"’ LINES TERMINATED BY ‘\r\n’ ignore 1 lines (id , name,date);

This worked. Thank you :slight_smile:

@vvaidya & @Amitha
please give the solution on that