Re: Q: how to insert text which includes a & (ampersand) using sqlplus

From: Valery Yourinsky <vsu_at_softserv.msk.ru>
Date: 1996/07/11
Message-ID: <ABxYGvn8U6_at_softserv.msk.ru>#1/1


Doron Sherman <dorons_at_w3spider.com> writes:

>In sqlplus, using an INSERT statement like the following -
>
>INSERT INTO table1 VALUES ('A & B')
>
>causes a prompt to appear as a response for asking a value
>for B, rather than inserting the string 'A & B' into the database.
>
>My question is, how is a & (ampersand) inserted using an INSERT
>statement. Is there a special escaping needed for that ?

   Before inserting you must turn SCAN off with the command:

      SET SCAN OFF
      INSERT INTO table1 VALUES ('A & B');
      ...
      INSERT INTO table1 VALUES ('Y & Z');

and then if needed:

      SET SCAN ON Valery

--
SoftService, Moscow
Oracle Corp. Distributor
tel (095) 976-34-78, 976-43-13 
tel/fax (095) 976-01-33
Received on Thu Jul 11 1996 - 00:00:00 CEST

Original text of this message