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 -> Re: Determine if a parameter has been passed

Re: Determine if a parameter has been passed

From: William Robertson <williamr2019_at_googlemail.com>
Date: Sat, 22 Sep 2007 12:18:48 -0000
Message-ID: <1190463528.651555.251270@y42g2000hsy.googlegroups.com>


On Sep 20, 12:05 pm, addve..._at_gmail.com wrote:
> Hi,
> There is a Stored procedure which has 10 parameters. All of the
> parameters are of type VARCHAR2. The invoker has been given the
> facility that, he/she may pass in only 3 out of the 10 parameters.
> My question is this, is it possible to determine inside the
> Stored procedure, whether a parameter has been passed or not by the
> invoker?
>
> Please note the invoker may pass NULL in any one of the parameters.
>
> Regards
> Amardeep Verma

For one or two parameters you could use overloading (i.e. present alternative versions of the procedure with and without the parameter). Whether 11 versions of the procedure will be practical and meet the requirement in this case I'm not sure:

procedure myproc;

procedure myproc(p1 varchar2);
procedure myproc(p1 varchar2, p2 varchar2);
procedure myproc(p1 varchar2, p2 varchar2, p3 varchar2);
procedure myproc(p1 varchar2, p2 varchar2, p3 varchar2, p4 varchar2);

etc Received on Sat Sep 22 2007 - 07:18:48 CDT

Original text of this message

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