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: Wed, 10 Feb 1999 21:54:51 GMT
Message-ID: <36c2ffa7.33844886@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 Wed, 10 Feb 1999 00:52:52 -0500, you wrote:

>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
>"&"?
>

& is just a 'macro variable' marker. by setting it off you are saying "i have no macro variables". It is usually used by a parameterized script (eg: run this script and pass in a table name or something).

You want to "set define off" around code that does not use a macro variable, you could redefine it "set define @" or some other character if you need macros but want to use an & in the statement.

you would set define on or set define & later to make it in use again.

its pretty harmless to turn it on and off

>Mike
>
>
 

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 Wed Feb 10 1999 - 15:54:51 CST

Original text of this message

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