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: Ari Kaplan <akaplan_at_interaccess.com>
Date: 1997/09/18
Message-ID: <5vrfmg$sgg$3@nntp3.interaccess.com>#1/1

David,

Use the "SET DEFINE" option in SQL*Plus to allow a & to be inserted. Look at the following example:

SQL> SET DEFINE '^'
SQL> SELECT '&TEST' FROM DUAL; &TEST



&TEST SQL> Hope this helps!

-Ari Kaplan
Independent Oracle DBA Consultant

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
<-> For 105+ Oracle tips, visit my Web Page:                      <->
<->                                                               <->
<->             http://homepage.interaccess.com/~akaplan          <->
<->                                                               <->
<->             email: akaplan_at_interaccess.com                    <->
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->

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 Thu Sep 18 1997 - 00:00:00 CDT

Original text of this message

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