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 -> Passing Parameter to SQL+ script containing PL/SQL block..

Passing Parameter to SQL+ script containing PL/SQL block..

From: R Chin <rchin_at_panix.com>
Date: Thu, 16 May 2002 14:25:04 -0400
Message-ID: <ac0td8$e4m$1@reader1.panix.com>


this line in UNIX shell script starts SQL+ to run a script (REPORT.sql) and pass it a parameter:

sqlplus -S user/pwd @REPORT.sql "MAINREPORT"

--this is REPORT.sql

BEGIN
  if '&1' = 'MAINREPORT'
  then

      CORP_PKG.MAINREPORT;
  else
    ....

END;
/

Can I use '&1' in the sql script to receive the parameter ? It does not seem to work....

Thanks
Rob Received on Thu May 16 2002 - 13:25:04 CDT

Original text of this message

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