Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how do I put a & in a varchar2?
I didn't know that there were so many ways to overcome this problem but the one I use is
SET ESCAPE ON This sets an escape character on which by default is '/' just preceed '&' with '/' and you should be fine.
This is what the manual says about this
**************SET ESCAPE*****************
Defines an escape character you can use before the substitution character. The escape character instructs SQL*Plus to treat the substitution character as an ordinary character rather than as a request for variable substitution. The default escape character is a backslash (\).
On Wed, 17 Sep 1997 18:24:55 -0400, David Kramer <Dskramer_at_concentric.net> wrote:
>
>
>This sounds stupid, but I can't find this in three different Oracle books.
>
>If I use a & in my insert, it thinks I'm defining a variable. In fact,
>I'm inserting a URL into a field in my database. How do I escape it?
>
>TIA.
>
>
>-------------------------------------------------------------------
>DDDD David Kramer dskramer_at_concentric.net
>DK KD http://www.concentric.net/~dskramer
>DKK D
>DK KD "Time's fun when you're having flies." -- Kermit the Frog
>DDDD
>
>
Received on Tue Sep 23 1997 - 00:00:00 CDT