Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Problem with single quote character
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
![]() |
![]() |