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: Datatype in stored functions

Re: Datatype in stored functions

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: Tue, 19 Aug 2003 20:00:10 +1000
Message-ID: <3f41f567$1$10357$afc38c87@news.optusnet.com.au>


"Hans Sauren" <hsauren_at_gruen-ag.de> wrote in message news:bhsp0u$8kf$1_at_online.de...

> I've created a stored function empty(dVar DATE)... successfully. Then I
> wanted to create a second function empty(nVar Numeric). This function wasn't
> created. ORACLE-message: 'name is already used by an existing object'. Any
> suggestion how I can do function overloading in Stored Functions of ORACLE?

Sorry, my fault. I should have given you the full story.

First: I'm not sure if "empty" is not a reserved word. Check in the manual.

Second:
you can create overloaded functions only inside a package. So, you have to create a package and the functions inside the package. Make it an easy short name for the package so you don't have to type much when referencing them.

The PL/SQL manual has some very good examples how to do this.

The disadvantage is of course it's more work to create. The advantage is once one function is loaded and used, all the other overloaded functions in the same package will be ready for work.

--
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Tue Aug 19 2003 - 05:00:10 CDT

Original text of this message

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