MySQL Forums
Forum List  »  Stored Procedures

Re: Dynamic SQL problem in Store Procedure
Posted by: Yurii Korotia
Date: September 30, 2012 02:14PM

set @s=


concat('SELECT ID, replace(replace(field_a,\'*\',\'\'),\'\\\'\',\'\\\\\'),

' FROM table where field_b = ',vVariable);


but i guess it will show error as resulting query will contain \ which is not allowed column name

if get your idea right



Edited 1 time(s). Last edit at 09/30/2012 02:21PM by Yurii Korotia.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Dynamic SQL problem in Store Procedure
954
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.