> "Noons" <wizofoz2k_at_yahoo.com.au> schrieb im Newsbeitrag
> news:3f41f567$1$10357$afc38c87_at_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
>>
>>
> Hi Nuno,
> Thanks for your answer. I created a package with the function empy (it
> works!) with 3 different datatypes as parameters. Then I've created the
I assume, from the context of this thread, when you write empy you
actually meant empty.
In order to determine if a word is reserved in Oracle, one should
actully ask v$reserved_words:
select * from v$reserved_words where keyword = 'EMPTY'
In this case, empty is no keyword.
Rene
--
Rene Nyffenegger
www.adp-gmbh.ch
Received on Tue Aug 19 2003 - 10:03:48 CDT