Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL variable argument list function
DECODE is a built-in function. The exposed function looks like a PL/SQL
function, but in fact is implemented internally (I believe Oracle was
written in C). So while the designers of PL/SQL have access to the slick
features of C, such as variable arguments to functions, us PL/SQL
programmers do not. For a strictly PL/SQL solution, you can use the default
method of hiding extraneous parameters, or use the PL/SQL table (later
called a nested table), or pass in a single string and parse out the
parameters (perhaps delimited by commas within the string). If you're
running Oracle 8, you can write your own external C function as a DLL and
call it from PL/SQL, but I don't know if that will give you the variable
parameter list you're looking for.
--
- Dan Clamage
http://www.telerama.com/~dclamage
If you haven't crashed the Server,
you haven't been trying hard enough.
Nuno Guerreiro <nuno-v-guerreiro_at_telecom.pt> wrote in article
<359c51ef.169257359_at_news.telecom.pt>...
> On 2 Jul 1998 01:23:55 GMT, danhw_at_aol.com (DanHW) wrote:
>
>
> Many thanks for the clear explanation, but I was expecting to find a
> more pratical way of declaring a function/procedure with a bing number
> of arguments. For example, how would you implement the decode()
> function? Would it be necessary to write all the possible number of
> arguments the function accepts?
>
>
> Nuno Guerreiro
>
>
Received on Fri Jul 03 1998 - 14:31:45 CDT
![]() |
![]() |