Re: finding SQL that doesn't have bind variables

From: Phillip Jones <phil_at_phillip.im>
Date: Fri, 16 Mar 2012 15:32:47 +0000
Message-ID: <CAOyzJueem9oX0=mCcC5BZA-oDryjy9cag9WoSVzefwECxBTeRQ_at_mail.gmail.com>



Hi,
You escape ' with an extra ', giving ''. So your insert would be:

insert into test values ('select 1 from mytable where x =''v'' and y = ''q''');

Same in regexps. eg:

PHILJ_at_phil112 > select regexp_replace('foo''foo','''','@') from dual;

REGEXP_



foo_at_foo

PHILJ_at_phil112 >

Cheers,

Phil

On Fri, Mar 16, 2012 at 3:05 PM, Dba DBA <oracledbaquestions_at_gmail.com>wrote:

>
> -- sql is basically 2 parts. inner part gets changes anything between
> single quotes to an _at_(the translate turns the single quote to an @. I was
> having trouble passing single quotes to
> a regular expression so I just turned the quotes into an _at_.
>
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Mar 16 2012 - 10:32:47 CDT

Original text of this message