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

Home -> Community -> Usenet -> c.d.o.server -> Re: Dumb Question, how to insert ' into varchar2 field

Re: Dumb Question, how to insert ' into varchar2 field

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Tue, 15 Feb 2005 19:49:48 -0800
Message-ID: <N6CdnZYaVOlcX4_fRVn-uw@comcast.com>

"Perm" <rhugga_at_yahoo.com> wrote in message news:1108483819.585160.10850_at_g14g2000cwa.googlegroups.com...
>
> Don't ask why but I have a need to insert a ' symbol into a varchar2
> field. Replacing ' with something else is not option.
>
> I have tried escaping it:
>
> insert into user.table values ( 'some text containing \'. some more
> text' )
>
> Oracle complains about the ' symbol (ORA-00917).
>
> What is the proper way to 'escape' this symbol so I can store it into a
> varchar2 field?
>
> much thx
>

If you use bind variables you wouldn't have this problem. Jim Received on Tue Feb 15 2005 - 21:49:48 CST

Original text of this message

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