Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Determine if a parameter has been passed
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
![]() |
![]() |