Re: Ampersand '&' within comment - piculiar problem

Re: Ampersand '&' within comment - piculiar problem

 

  

Hello Verma,

because SQL*Plus does simple string replace.

You can set verify off.

You can use "+" instead of "&". I would do that.

You can use this feature:
SQL> def friend="Jerry"
SQL> BEGIN
2 /* MY COMMENT -- > Tom and &friend */
3 NULL;
4 END;
5 .
SQL> /
old 2: /* MY COMMENT -- > Tom and &friend */
new 2: /* MY COMMENT -- > Tom and Jerry */

PL/SQL procedure successfully completed.

Friday, October 8, 2004, 10:34:40 AM, you wrote:
VJ> I have written the following simple code on SQL*Plus

VJ> BEGIN
VJ> /* MY COMMENT -- > Tom & Jerry*/
VJ> NULL;
VJ> END;
VJ> /
VJ> Enter value for jerry: Why are you asking here..??
VJ> old 2: /* MY COMMENT -- > Tom & Jerry*/
VJ> new 2: /* MY COMMENT -- > Tom Why are you asking here..??*/

VJ> PL/SQL procedure successfully completed.


VJ> Why at all Oracle should ask for the value of any bind variable when I am
VJ> not intending to put it in as an executable statement. The ampersand is
VJ> within comment.
VJ> Please clarify.

HTH
Wieland mailto:[Email address protected]


Oracle LazyDBA home page