Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: parameter substitution in SQL*PLUS

Re: parameter substitution in SQL*PLUS

From: Some One <someuser_at_some.host>
Date: 1997/09/04
Message-ID: <340F2E93.3543@openix.com>#1/1

I use

set define off

before I run my script and it works...

AMARENDRA B NETTEM wrote:
>
> mdavies_at_elekom.com wrote:
> >
> > I would like to execute an update statement as follows:
> >
> > update table1 set field1 = 'long & lean' where record_id = nn;
> >
> > where the literal string 'long & lean' contains the ampersand character
> > (&) as a literal character. While there is nothing in SQL to dissallow
> > this, the SQL*PLUS window environment keys on this character as a
> > parameter substitution character and prompts me to enter a value.
> >
> > If I have this update statement in a script in a file, how can I escape
> > the "&" character when submitting the script to the database thru
> > SQL*PLUS?
> >
> > Thanks in advance for anyone's help on this.
> >
> > mdavies_at_elekom.com
> > ELEKOM Corp. a developer of business to business commerce software.
> >
> > -------------------==== Posted via Deja News ====-----------------------
> > http://www.dejanews.com/ Search, Read, Post to Usene
>
> at sql prompt
> SQL> SET ESCAPE '\'
> SQL>update table1 set field1 = 'long \& lean' where record_id = nn;
>
> Hope This Helps
>
> AMARENDRA
> --
> ************************************************************************
> AMARENDRA B NETTEM 5039 N E River Road, Apt. 1A
> Certified Oracle DBA NORRIDGE, IL 60656
> Whittman-Hart Inc.,
> Chicago, IL 60656.
>
> Ph.No. (708) 583 9870 (H) E-mail: nettama_at_charlie.cns.iit.edu
> (312) 913 6758 (W) anettem_at_whittman-hart.com
>
> Homepage: http://www.iit.edu/~nettama
>
> **********************************************************************
Received on Thu Sep 04 1997 - 00:00:00 CDT

Original text of this message

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