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: SQL Statement error

Re: SQL Statement error

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1997/06/04
Message-ID: <3395c309.49542798@www.sigov.si>#1/1

On Tue, 03 Jun 1997 17:01:30 -0400, Syed Rashid <rashids_at_ttc.com> wrote:

>Can anyone tell me what do I have to do to make the following update>statement to accept the "&" symbol in the first place. Is there anyway
>to automate this, so any sql statment will accept "&" in any field?
>
>SQL> update contact set cncompany = 'AB&D' where cncompid = 'cp9208'
> 2 ;
>Enter value for t: &D
>old 1: update contact set cncompany = 'AB&D' where cncompid = 'cp9208
>new 1: update contact set cncompany = 'AB&D' where cncompid = 'cp9208
>
>1 row updated.
>
>Thanks much
>Syed Rashid

Repeating one of my previous posting on similar question:

It is obvious you are having this problem in SQL*Plus. To avoid SQL*Plus interpreting '&' as substitution character, you have several options:

  1. SET SCAN OFF or
  2. SET DEFINE OFF or SET DEFINE to any appropriate character other than '&' or
  3. SET ESCAPE ON and then precede '&' with escape character (the default escape character is '\'=

For more details look at SET command in SQL*Plus manual.

Regards,


Jurij Modic                             Republic of Slovenia
tel: +386 61 178 55 14                  Ministry of Finance
fax: +386 61  21 45 84                  Zupanciceva 3
e-mail: jurij.modic_at_mf.sigov.mail.si Ljubljana 1000
Received on Wed Jun 04 1997 - 00:00:00 CDT

Original text of this message

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