Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Escaping the &
and yet another one
If you need to process data ampersands but also need to pass arguments, then use
set define <any character that will not be used in data>
eg set define ~ a tilde is a often a useful character for this purpose. then instead of select.... from .... where thing = ¶m becomes select .... from ..... where thing = ~param
Rod Corderey
Lane Associates
RodCorderey_at_LAne-Associates.com
http://www.Lane-Associates.com
Girts Graudins wrote:
>
> > If I attempt to insert 'Sound & Music', Oracle always prompts me for
the
> > value of Music
> > because it thinks I'm specifying a variable.
>
> All the above solutions will work, but
>
> SQL> set scan off;
>
> is the one that targets the real problem. Set scan off turns off the
> feature of SQL*Plus that looks for '&name' and interprets them as
> variables. This is especially useful if you want to compile a web page
> with lots of special characters like &, etc.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Girts Graudins
> Consulant
> The Exeter Group, Inc.
> ggraudins_at_hotmail.com
> http://www.exetergroup.com/
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Apr 11 2000 - 00:00:00 CDT
![]() |
![]() |