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: How to include '&' in a varchar2 insert statement?

Re: How to include '&' in a varchar2 insert statement?

From: Diane <Diane_at_coalole.demon.co.uk>
Date: Tue, 9 Feb 1999 19:11:38 +0000
Message-ID: <TSV+jAAqhIw2Iwbl@coalole.demon.co.uk>


In article <36c4a9e2.9462957_at_192.86.155.100>, Thomas Kyte <tkyte_at_us.oracle.com> writes
>A copy of this was sent to gremlin <gremlinNO__SPAM___at_ix.netcom.com>
>(if that email address didn't require changing)
>On Mon, 08 Feb 1999 22:12:06 -0500, you wrote:
>
>>Hi:
>>
>>I am having difficulty getting an embedded '&' string into a varchar to
>>insert statement. For instance, how would I insert the value "Wiley &
>>Sons" into a varchar2 column ?
>>
>>Using Oracle 8.0.4.1 on an SGI.
>>
>>TIA,
>> Mike
>
>I assume you must be using sqlplus and when you try to:
>
>
>SQL> insert into t values ( 'Wiley & Sons' );
>Enter value for sons:
>old 1: insert into t values ( 'Wiley & Sons' )
>new 1: insert into t values ( 'Wiley ' )
>1 row created.
>
>SQL> set define off
>
>SQL> insert into t values ( 'Wiley & Sons' );
>1 row created.
>
>SQL> select * from t;
>
>X
>-------------------------
>Wiley
>Wiley & Sons
>
>
>if you set define off -- it'll work in sqlplus.
>
>
>Thomas Kyte
>tkyte_at_us.oracle.com
>Oracle Service Industries
>Reston, VA USA
>
>--
>http://govt.us.oracle.com/ -- downloadable utilities
>
>----------------------------------------------------------------------------
>Opinions are mine and do not necessarily reflect those of Oracle Corporation
>
>Anti-Anti Spam Msg: if you want an answer emailed to you,
>you have to make it easy to get email to you. Any bounced
>email will be treated the same way i treat SPAM-- I delete it.

I was told to try 'set scan off'
--
Diane Received on Tue Feb 09 1999 - 13:11:38 CST

Original text of this message

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