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: Using ' character in string in where statement

Re: Using ' character in string in where statement

From: JustAnotherDBA <jadba_at_bellsouth.net>
Date: Sat, 18 Jan 2003 01:51:53 -0600
Message-ID: <zk7W9.7174$F_3.2065@news.bellsouth.net>


Ooops... I meant to put '' instead of ' in the first statement .

Equal results:

Select 'I want a '' right here.' from dual ; Select 'I want a '||chr(39)||' right here.' from dual;

"JustAnotherDBA" <jadba_at_bellsouth.net> wrote in message news:ye7W9.7156$F_3.5717_at_news.bellsouth.net...
> You could also use chr(39) which is the equivalent of a single quote .
>
> Select 'I want a ' right here.' ... is the same as ...
> Select 'I want a '||chr(39)||' right here.' ...
>
> All kinds of ways to do everything :)
>
> "Christian Svensson" <chse30_at_hotmail.com> wrote in message
> news:ccc2a7eb.0301170203.13eaf3f2_at_posting.google.com...
> > Greetings,
> >
> > I hope someone can help me with this maybe "stupid" question. I have
> > looked at otn and in this newsgroup but cant find anything.
> >
> > If I want to use a ' character in the string in my where statement,
> > how do I do then ?
> >
> > for example select something from some_table where some_col = 'my '
> > character'
> >
> > Thanks for any answers.
> >
> > Cheers !
> >
> > /Christian
>
>
>
Received on Sat Jan 18 2003 - 01:51:53 CST

Original text of this message

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