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: AMPERSAND in where clause mistaken for variable name

Re: AMPERSAND in where clause mistaken for variable name

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1997/05/15
Message-ID: <337b752a.8403412@www.sigov.si>#1/1

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
  2. SET DEFINE OFF or SET DEFINE to any appropriate character other than '&'
  3. SET ESCAPE ON and then precede '&' with escape character (default escape character is '\'

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

Regards,

Jurij Modic,
Ministry of Finance, Republic of Slovenia


On Thu, 15 May 1997 13:41:22 -0600, djose_at_att.com wrote:
>I have a query which is as follows
>
>SELECT
> column_1,
> column_2
>FROM
> table
>WHERE
> column_3 = 'ABC&DEF';
>
>The problem is 'ABC&DEF' represents a value in the table, but because of
>the ampersand oracle mistakes it for a variable which has to be input
>and prompts me for DEF.
>
>My question : Is there a way to make oracle understand that 'ABC&DEF' is a
>data value in the column and not prompt me for DEF.
>
>Any input would be very much appreciated.
Received on Thu May 15 1997 - 00:00:00 CDT

Original text of this message

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