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: Can we pass variable paramaters to a procedure?

Re: Can we pass variable paramaters to a procedure?

From: Pradhan <empradhan_at_dplus.net>
Date: Tue, 20 Apr 1999 00:24:15 -0400
Message-ID: <mqTS2.323$nH4.1991@newsfeed.slurp.net>


Hi
deb wrote in message ...
>For those of you who are familiar with C programming, you can check the
>number of arguments to a function with the help of argc/argv. I was
>wondering if there is some way to do a similar thing for an Oracle
>procedure?

To my understanding oracle does not have construct like argc/argv.

>Can I set the number of parameters that a procedure accepts as variable and
>then within the procedure count the number of actual values entered by the
>user?

Yes, you can set the number of parameters that a procedure can accept. and with in procedure you can validate how many parameters were passed.

an example ..

       procedure check_parameters (value01 varchar2 Default NULL,
                                                             value02 number
Default NULL,
                                                             value03
varchar2 Default NULL,
.............................................
                                                             value10
varchar2 Default NULL) is
     Begin
              stmt..
              check_parameter...
     End.

HTH
Pradhan Received on Mon Apr 19 1999 - 23:24:15 CDT

Original text of this message

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