Ampersand (&) in comment line does not error

markpinks

Member
Hello.
I have noticed when compiling a spec or body in version 5.1.4.730 that, if you include an ampersand (&) character in a comment line, it compiles fine, but when you compile on the command line, you are prompted for the value of what it thinks is a variable immediately following the &. I checked the Oracle documentation, and this is a known feature of the compiler (http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch6.htm#1006470). So is it something that is known about PL/SQL Developer? And is it fixed in a version after 5.1.4.730?

Thanks in advance.

Mark.
 
Substitution variables are a SQL*Plus feature. It is not a feature of the PL/SQL compiler of the Oracle Server.

If you want to compile a source file that includes ampersands from the command line, you must first execute the "set scan off" command. For example:

SQL> set scan off
SQL> @employee.pck
 
Hi Marco,

What about adding new parameter to Tools / Preferences... interface about PL/SQL behaviour around ampersand in comments?

We have very extensive application with lots of packages. Developers use PL/SQL Developer as development tool. Actual implementation process is batch that recompiles all the packages. This batch executed on Unix computer via SQL*Plus.

We experience this problem time to time when developer put ampersand in comment but SQL*Plus refuses to recompile it and waits for input.

I would like to have radio-button or checkmark that will change PL/SQL Developer to pay attention to this symbol inside package (as SQL*Plus does by default) or ignore it (as it is now).

P.S. Regarding to Oracle 9i documentation 'SET scan' is obsolete. Use 'SET define' instead.

Thanks,
Boris
 
Back
Top