I have a string –
insert into staging_table values('AC','36569','SL','4950 W NEWPORT','CHICAGO');insert into staging_table values('AC','36569','SL','4950 W NEWPORT','CHICAGO');
I have a worksheet TEST and it has 2 columns SQL,flg.
Data under these columns is " ",1
How can I write an update statement to update the value of column SQL where flg is 1 with above string.
The problem I am facing is that the single quotes present in the string, when I execute the update statement I get a syntax error …Please advise.
If you want to use a string value containing single-quotes in a SQL insert/update, you need to escape the ‘ by doubling them up
E.g.
...values('AC','36569',...should be
...values(''AC'',''36569'',...