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: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 09 Feb 1999 03:24:47 GMT
Message-ID: <36c4a9e2.9462957@192.86.155.100>


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. Received on Mon Feb 08 1999 - 21:24:47 CST

Original text of this message

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