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: Robert W. Swisshelm <swisshelm_at_lilly.com>
Date: 1997/04/11
Message-ID: <334F00B0.4C0F@lilly.com>#1/1

Chris Sarjent wrote:
>
> 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.
> >
> > Mark W.
> Include SET DEFINE OFF in your script or issue it prior to executing
> your insert statement. The ampersand is the default substitution
> variable character. You can either turn this off or set it to another
> character using the SET DEFINE xxx statement.
>
> Chris Sarjent

You can also use SET SCAN OFF to avoid all variable substitution, or SET ESCAPE ON to allow the use of a '\' to cause sqlplus not to evaluate an individual &.

	set escape on
	Insert into xxx values ('Me \& you');

-- 
Bob Swisshelm
Eli Lilly and Company
swisshelm_at_lilly.com
Received on Fri Apr 11 1997 - 00:00:00 CDT

Original text of this message

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