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: SQL/plus question

Re: SQL/plus question

From: Kirk Bradley <kbradley_at_us.oracle.com>
Date: 1997/04/11
Message-ID: <kbradley-ya023180001104971729120001@192.86.155.83>#1/1

not that most of you care but not all Oracle databases are ASCII.. use SET ESCAPE or SET SCAN OFF

In article <334E5829.34E1_at_ford.com>, "Larry W. Liebau" <lliebau_at_ford.com> wrote:

> QuadTwin wrote:
> >
> > mwebb_at_cix.compulink.co.uk ("Mark Webb") wrote:
> >
> > > Hi everyone,
> > >
> > > This must be a FAQ but I can't see how (if indeed it is possible) to
> > > get an ampersand (&) into a character literal in sql/plus.
> > >
> > > Something like:
> > >
> > > Insert into xxx values ('Me & you');
> > >
> > > Gives:
> > >
> > > please enter value for 'you':
> > >
> > > Thanks in advance.
> >
> > There may be an option on the SQL*PLUS SET command to change the
> > delimiter used to precede a substitution variable reference. SQL*PLUS
> > uses ampersand "&" to signal the need for the operator to provide a value
> > for the variable whose name follows the ampersand, in this case the
> > word "you" is assumed to be the name of that variable.
> >
> > If you can't find a way to redefine the character used for this purpose,
> > you can do your insert this way:
> >
> > Insert into xxx values ('Me ' || chr(38) || ' you');
> >
> > The value 38 is the ASCII numeric equivalent to ampersand. CHR is
> > the handy ASCII numeric to character conversion function.
> >
> > Al Lawson
> > Interactive Group, Inc.
> > www.interactive-group.com
> > lawsona_at_interactive-group.com
> Or if you don't need variable substitution, use
> SET DEFINE OFF
>
> --
> Larry W. Liebau
> Q&PL - QPIS PROFS: LLIEBAU
> Ford Motor Co. Phone: 313-33-71614
> <<< All standard disclaimers apply! >>>
  Received on Fri Apr 11 1997 - 00:00:00 CDT

Original text of this message

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