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: Greg Kainz <gkainz_at_rmi.net>
Date: 1997/10/03
Message-ID: <34353F4E.67D6@rmi.net>#1/1

even easier...
sql> set scan off
sql> insert into table xxx values ('string_with_&_here');

Cleve Sharpe wrote:
>
> David Kramer wrote in article ...
>
> >This sounds stupid, but I can't find this in three different Oracle books.
>
> Nope, it is a legitimate question.
>
> >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?
>
> You have to concatenate the '&' character for it to work as follows:
>
> INSERT INTO your_table VALUES
> ('http://www.test.com/~kramer/test.html?'||'&'||'submit')
>
> That is, you have to split up the URL where the '&' is by itself and
> concatenated with the other parts of the URL.
>
> Hope this helps
> =-=-=-=-=-=-=-=-=-=-=-=-=-=
> Cleve.
 

-- 
------------------------------------------------------------
               DataWeb Consulting Services, Inc.
              "Web-enabling your databases today"
voice:(303)517-3863                       FAX:(303)422-5107
                       gkainz_at_rmi.net
------------------------------------------------------------
Received on Fri Oct 03 1997 - 00:00:00 CDT

Original text of this message

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