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: gremlin <gremlinNO__SPAM___at_ix.netcom.com>
Date: Wed, 10 Feb 1999 00:52:52 -0500
Message-ID: <36C11EB4.7ECE92A9@ix.netcom.com>


Thanks, set define off seems to work. I just wonder what other side effects are in effect during that time I set it off now? There is not way to just escape the "&"?

Mike

Diane wrote:

> 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

--



To reply to me via email, remove the "__NO_SPAM__" in the header email address.
Received on Tue Feb 09 1999 - 23:52:52 CST

Original text of this message

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