Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ' in dynamic sql
In article <3c0f16aa_at_cpns1.saic.com>, "Allan says...
>
>Hi,
>
>I have got a dynamic SQL statement which when build, the data which is going
>to be inserted into a table, may have the ' symbol in it. This means that
>when I'm executing my SQL statement, the string is ended by the rouge ' .
>Can anyone suggest anything?
>
>Allan
>
>
USE BIND VARIABLES!!! not only will the occurrence of a ' in the string no longer be relevant, its the only way your application will
o scale
o make use of shared sql
o perform with a darn
o work
insert into t values ( :b1, :b2 );
and BIND the values for b1 and b2. Every language can do this.
-- Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Thu Dec 06 2001 - 10:50:15 CST