Link to home
Create AccountLog in
Avatar of atwork2003
atwork2003

asked on

Escape character in SQL Statement

Hello. I have a SQL statement like this one, which is not going through, please note there is the exact value that I want to update including backslashes and commas

updateupdate IS_GEN set SCRIPTS="udel //noo e:/system/ls.sh /%NN% "www.xytel.ca" where ID=8976;
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
need single quotes, double quotes are no different than any other letter.


update IS_GEN set SCRIPTS='"udel //noo e:/system/ls.sh /%NN% "www.xytel.ca"' where ID=8976;
dbmullen has right. you need only singel quotes before and after your string.
if you want to update "udel //noo e:/system/ls.sh /%NN% "www.xytel.ca" this then,

updateupdate IS_GEN set SCRIPTS='"udel //noo e:/system/ls.sh /%NN% "www.xytel.ca"' where ID=8976;

if you want to update udel //noo e:/system/ls.sh /%NN% "www.xytel.ca" this then,

updateupdate IS_GEN set SCRIPTS='udel //noo e:/system/ls.sh /%NN% "www.xytel.ca"' where ID=8976;

Thanks
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of atwork2003
atwork2003

ASKER

Exception help:) Thank you
Thank you sooo much for such great support and quick responses, appreciate all the help very much:)