Re: Dynamic SQL problem in Store Procedure
Thanks, but I already do. This is my syntax:
set @s= concat('SELECT ID, replace(replace(field_a,''*'',''''),''\''',''\\'''')
FROM table where field_b = ',vVariable,'');
prepare stmt from @s;
execute stmt;
deallocate prepare stmt;
Can anyone tell me what is wrong with it? I wnt to find a single quote (so I escape it with a backslash, and replace it with a backslash and single quote (so I escaped the backslash.
But MySQL tells me there is any error in my syntax. And, I can't see it.
Subject
Views
Written By
Posted
2239
July 13, 2012 06:55AM
1227
July 13, 2012 10:01AM
1447
July 13, 2012 04:26PM
1123
July 13, 2012 10:04PM
Re: Dynamic SQL problem in Store Procedure
1226
July 18, 2012 05:03AM
1177
July 18, 2012 09:54AM
955
September 30, 2012 02:14PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.