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: overloading in oracle

Re: overloading in oracle

From: David Fitzjarrell <oratune_at_aol.com>
Date: Fri, 10 Nov 2000 15:36:38 GMT
Message-ID: <8uh4m5$37r$1@nnrp1.deja.com>

In our last gripping episode Thomas Schelhorn <tomsonn_at_my-deja.com> wrote:
> Hi!
>
> We've got the following problem: we have a package and we declared 2
> procedures with same name but the parameters are referencing different
> columns in the same table. Unfortunately the column-datatypes are of
 the
> same type.
>
> the compilation runs trough it without any error-messages, but wenn we
> try to compile another package containing a procedure that calls the
> overloaded procedures we receive an 'to many declarations of
> "procedure-name" match this call' - error.
>
> Is it possible to get a workarround for this without having to change
> procedure-names.
>
> to make things clearer a short code-snippet:
>
> procedure my_procedure (
> my_parametername1 in my_table.my_column1 %type,
> ...
> )
>
> procedure my_procedure (
> my_other_parametername2 in mytable.my_other_column2 %type,
> ...
> )
>
> procedure call_my_procedure (
> ...
> begin
> my_procedure( ...)
> )
>
> the package that contains call_my_procedure fails to compile with the
> error described in the beginning.
>
> thanx in advance
> Tom
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Procedure and function overloading is used for procedures/functions with the same name/functionality but accepting different data types; good examples of this are found in the dbmssql.sql script (among others) found at $ORACLE_HOME/rdbms/admin (on UNIX; on NT/2000/98 it will be under the RDBMS\ADMIN or RDBMS80\ADMIN directory under the Oracle installation directory). I don't believe you can overload a function/procedure when you have the same datatype between the two versions.

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Nov 10 2000 - 09:36:38 CST

Original text of this message

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