Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Datatype in stored functions
"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.nospamReceived on Tue Aug 19 2003 - 05:00:10 CDT