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: <fitzjarrell_at_cox.net>
Date: Thu, 20 Sep 2007 08:29:41 -0700
Message-ID: <1190302181.913602.296430@g4g2000hsf.googlegroups.com>


On Sep 20, 6:05 am, 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

If the invoker can pass NULL to any of the parameters, and the invoker passes NULL to all parameters then they ALL have been passed in to the procedure, regardless of the passed value. If the invoker can pass 3, 4, 5, 6 ... parameters without passing anything else then one could check for the existence of default values in the parameter list to determine, in a round-about way, how many of the parameters were passed. Of course the invoker could pass the default values to the parameters and this method would no longer 'work'.

What purpose does this serve, really? Why do you 'need' to know how many of the 10 parameters were actually passed values by the invoker? This seems to be an exercise in futility to me.

David Fitzjarrell Received on Thu Sep 20 2007 - 10:29:41 CDT

Original text of this message

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