MySQL Forums
Forum List  »  Stored Procedures

Re: Dynamic SQL problem in Store Procedure
Posted by: Mark Rouse
Date: July 13, 2012 04:26PM

Thanks for this. But what I want to do is replace a single quote mark in my field with \'. the backslashes are only there to escape the single quote and the backslash I want to include with my single quote.

So where it finds ' in my field I want it to replace ' with \' instead. But this is within a dynamic sql statement in my procedure, so everything has to be double quoted. The problem I have is I'm not sure of the syntax.

replace(field_a,''''',''\''') I thought would have worked, but it doesn't. What's the correct syntax to replace a single quote with \' as part of my replace statement in a dyadic context.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Dynamic SQL problem in Store Procedure
1442
July 13, 2012 04:26PM


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.