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: Escaping the &

Re: Escaping the &

From: Michael J. Ort <michael_ort_at_my-deja.com>
Date: 2000/04/07
Message-ID: <8clljn$kq6$1@nnrp1.deja.com>#1/1

Try the following:
  SET ESCAPE \
  SELECT 'Sound \& Music' FROM DUAL;

You can set it to any character you'd like but remember that character will no longer appear in strings...

Michael J. Ort

In article <38EE0041.A50C321F_at_uscreative.com>,   "Michael C. Wilkerson" <Mike.Wilkerson_at_uscreative.com> wrote:
> Is there any way to escape an & in a string?
>
> If I attempt to insert 'Sound & Music', Oracle always prompts me for
 the
> value of Music
> because it thinks I'm specifying a variable.
>
> It will work if I break the string up into 'Sound ' || chr(38) || '
> Music' but I was hoping someone could give me
> an easier way.
>
> Thanks,
> Michael
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Apr 07 2000 - 00:00:00 CDT

Original text of this message

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