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: how do I put a & in a varchar2?

Re: how do I put a & in a varchar2?

From: Matt Southcott <matts_at_xxxnifcosynergy.com>
Date: 1997/09/23
Message-ID: <34282b9e.18073848@news.bctel.net>#1/1

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

Original text of this message

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