Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Problem with single quote character

Problem with single quote character

From: Chris L. <diversos_at_uol.com.ar>
Date: 4 Oct 2006 12:06:12 -0700
Message-ID: <1159988772.337682.237390@b28g2000cwb.googlegroups.com>


Hi,

The problem: Building dynamic SQL sometimes results in statements like this:

execute immediate
'update owner.customers set city=''Unknown'', country=''Cote D'Ivoire''
where cust_id=37'
;

This is a problem, because the quote in [Cote D'Ivoire] renders the sql statement invalid.

Easily fixed, duplicating the quote as below:

'update owner.customers set city=''Unknown'', country=''Cote
D''Ivoire'' where cust_id=37'

My question: What other characters could "break" the sql? Maybe [:], [\], [&], [%]? Is there a complete list somewhere?

Furthermore, I remember seeing on documentation an option to make other characters play the role of the single quote but no matter what I search terms I use, I can't seem to find it.

Oracle 9i 9.2.0.4.0

Thanks all in advance. Received on Wed Oct 04 2006 - 14:06:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US