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: PLSQL PROBLEM with &

Re: PLSQL PROBLEM with &

From: Ray Teale <ray_at_BLAHholly.com.au>
Date: Wed, 3 Apr 2002 12:56:57 +1000
Message-ID: <rcuq8.87$qg.7709@ozemail.com.au>

I don't think Balaji's solution will work.

If I understand it correctly your problem is that SQL*Plus sees the ampersand as a user variable delimiter and therefore prompts you for a value for the variable..
There are many ways to solve this problem:

SET DEF OFF - will set user variable functionality off in SQL*Plus SET DEF '#' - will set the user variable delimiter to hash. SET ESCAPE ON - will allow you to escape the ampersand with a '\' - ie 'test\&01'.

.. any of these will solve your problem. There is probably heaps more.

Ray



"Balaji j" <balaji_n29_at_hotmail.com> wrote in message
news:a8c4pe$5h0$1_at_news.mch.sbs.de...
Hi,
Try
 insert into tname values (1000,'test'||'&'||'01');

Regards,
Balaji.



"George D. Benetos" <gbenet_at_intranet.gr> wrote in message
news:a8c02c$b8e$1_at_newsserv.intranet.gr... I AM TRYING TO insert a string with & in PLSQL and i get the message for enter value
How can insert the string 'test&01' in database ??

insert into adm_trace_log(TRACENO,LOGMESSAGE) values(100000,'test&01'); Enter value for 01:

thanx ....

--
----------------------------------------------------------------------------
-----

George D. Benetos
Electrical & Computer Engineer N.T.U.A

-------------------------------------------------------------------------
Received on Tue Apr 02 2002 - 20:56:57 CST

Original text of this message

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