Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: & symbol in PL/SQL

Re: & symbol in PL/SQL

From: Wolfgang Breitling <breitliw_at_centrexcc.com>
Date: Wed, 11 Aug 2004 11:20:26 -0600
Message-Id: <6.1.0.6.2.20040811111331.02f9a398@pop.centrexcc.com>


Change the define to a symbol that is less frequently used. I do it all the time - even have it in my login.sql - because I find the & to be far too prevalent in data.
What I got cought on a few times, and what upsets me as thoughtless/careless "programming" are install scripts from Oracle as well as third party vendors which just assume that & is the define symbol, when all it takes is a "set define '&'" at the beginning of the script to remove the assumption.

Of course changing the define symbol will not change the fact that it is still recognized within a comment.

At 11:01 AM 8/11/2004, you wrote:

>I don't write much PL/SQL as so it took many years before I ran into
>this one. Pardon me is this is well known. Tested in 7.3.4 \& 9iR2
>
>SQL> show define
>define "&" (hex 26)
>
>SQL> -- Comment line with & symbol in it
>
>[snip]

>Enter value for symbol: e
>old 5: -- comment line with a & symbol in it
>new 5: -- comment line with a e in it
>
>Why does the PL/SQL parser interpret the define symbol before comment
>delimeters? So one can't comment out a line of PL/SQL code containing
>a & without also using the escape? And worst of all, I can't use the
>& as shorthand for AND in my embedded comments. Open a TAR. Call out
>the National Guard.

Regards

Wolfgang Breitling
Centrex Consulting Corporation
www.centrexcc.com



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed Aug 11 2004 - 12:18:12 CDT

Original text of this message

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