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: Optional parameter execution while executing .sql file ..

Re: Optional parameter execution while executing .sql file ..

From: <Jared.Still_at_radisys.com>
Date: Tue, 10 Aug 2004 11:23:13 -0700
Message-ID: <OFF4F01418.92F14725-ON88256EEC.0064EBEF-88256EEC.00650371@radisys.com>


oracle-l-bounce_at_freelists.org wrote on 08/10/2004 11:20:20 AM: ...
> execute dss_report_tracker.complete_report(&1,&2);
>
> as the second line is not getting the first parameter , it stops to
> key in the second one
> (asks for values)?.
>
> We want to run the program , from some places with one parameter,
> and from some other places
> with 2 parameter. Inside the procedure complete_report second
> parameter is defaulted to 'VALID'.
> So no issues there.
>
> So how to modify the line
> execute dss_report_tracker.complete_report(&1,&2);
> so as to expect the parameter 2 as optional
>

Write a wrapper in the language of choice (Perl in my case) and control the arguments that are received from the command line.

Pass a dummy argument when there is none on the command line.

Easily done in ksh or bash as well.

Jared



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 Tue Aug 10 2004 - 13:21:03 CDT

Original text of this message

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