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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Where clause containing Ampersand

Re: Where clause containing Ampersand

From: Stephen B <stephen.bell_at_cgi.ca>
Date: Tue, 18 Dec 2001 10:42:01 -0500
Message-ID: <zuJT7.12444$J%2.1602631@news20.bellglobal.com>


Hi James,

Alternatively you can use two quotes around the ampersand..here's an example using INSERT but of course the same syntax will work with update:

  1 INSERT INTO NEWSGROUP
  2* VALUES('NEW TEXT','JAY ''&'' SILENT BOB') SQL> / 1 row created.

Or you can look at the ESCAPE OPERATOR in the docs...

I hope this helps,

Steve

"James Alexander Starritt" <james_at_jamesstarritt.com> wrote in message news:9vnle1$gi8pf$1_at_ID-68406.news.dfncis.de...
> I have a where clause that contains an & as part of it. Oracle prompts
for
> a value, assuming that this is a variable. How do I put a literal
ampersand
> in my where clause.
>
> update table
> set field = 'New Text'
> where field = 'Jay & Silent Bob';
>
> Any ideas. Should be easy as pie but I can't figure it out
>
> --
>
> James Starritt
>
>
Received on Tue Dec 18 2001 - 09:42:01 CST

Original text of this message

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