Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Nested speech marks in sql insert
Hi,
I got completly fedup with trying to get this to work
so I have a local procedure that converts the ' to a string
then a procedure on the server that replaces the substitute back to the
'
the following depends on what system you are using, ODBC, sqlnet8, visualbasic, foxpro
!*****************************************************************
procedure fix_quotes
&& this procedure finds and replaces the single quote char with a safe
value
&& this is needed because when we call the oracle exec routine && we have to build a string , so any integral single or double quotes && will mess up the string parsing. && parameter scanstr m.scanstr=upper(alltrim(m.scanstr)) && convert touppercase & strip
**
try not to substitute other values, since it depends on you local
charset, and is not always cross platform.
kevin <kev_at_nexuscomp.co.uk> wrote:
> I have an oracle database > i am inserting SQL statements into it. > I have a line > > insert into db1 values(12, 15, 'insert into db2 values(1, > 2,'Fred Bloggs');'); > > any ascii value equivalent that will work > for nested ' > > thankyou > > >Received on Tue Feb 08 2000 - 18:23:32 CST