Menu

Issue with SQL-Plus and "@" and/or "#"

2004-09-24
2013-03-31
  • Jason Vogel

    Jason Vogel - 2004-09-24

    Commandline :

    C:\orant\bin\sqlplus jvogel/<<passwd>>@sun3500 @\\Packages\ahs_htp_spec.sql

    Source :

    set echo on;
    set define off;

    CREATE OR REPLACE PACKAGE ahs_htp
    IS

    /**
    Returns JavaScript source to set Focus to a <b>Verified</b> field

    @Return Javascript source text

    #Author Person...
    */
    FUNCTION focus(field_in     IN        VARCHAR2 )
    RETURN VARCHAR2;

    ...

    If I compile some PL/SQL via the command line with any "@" or "#" include then I get

    SP2-0310: unable to open file "Return.sql" or
    SP2-0734: unknown command beginning "Author Person..." - rest of line ignored.

    Because both "@" and "#" are SQL-Plus stubstitution variables.   The "set define off;" should have fixed the issues to warning...which it does...sort of.  The package will compile...but the @ and/or # line are REMOVED from COMPILED source.  So if someone pulls the files from DBA_SOURCE then the @ lines are lost.  Anybody got any ideas?

    Thanks,
    Jason

     
    • Albert Tumanov

      Albert Tumanov - 2004-09-24

      The syntax you use is slightly incorrect.
      Try this:

      /**
      * Returns JavaScript source to set Focus to a
      * <b>Verified</b> field
      *
      * @Return Javascript source text
      *
      * @Author Person...
      */

       
      • Jason Vogel

        Jason Vogel - 2004-09-24

        Actually, I tried both (including your example).  The real question is if anybody had solved the issue with compiling PL/SQL via SQLPLUS commandline and having the @ lines removed from the COMPILED source...

        Jason

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.