Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can we pass variable paramaters to a procedure?

Re: Can we pass variable paramaters to a procedure?

From: Vrajesh Patel <vrajesh.patel_at_mci.com>
Date: Tue, 20 Apr 1999 22:33:04 GMT
Message-ID: <371D0092.BFBA3C3@mci.com>


You cannot pass variable nos. of arguments like C. But can function overloading like C++.

Create package that have same name of function with different parameters.

eg.
package vPackage

     function cfunc(a number,b name, c number)......  -- 1
     function cfunc(a number,b name)...... -- 2
     function cfunc(a number)......  -- 3
     function cfunc()......  -- 4

end vPackage...

 So, when you call cfunc(10,'aa',20)..will call first one ..if cfunc(10,'aa')..will call 2nd one..and so on.

deb wrote:

> 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?
>
> 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?
Received on Tue Apr 20 1999 - 17:33:04 CDT

Original text of this message

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