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: PLS-00307 Too many declarations of ...

Re: PLS-00307 Too many declarations of ...

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 22 May 2007 06:42:42 -0700
Message-ID: <1179841362.761479.238910@z28g2000prd.googlegroups.com>


On May 22, 2:04 pm, "Vojta" <r..._at_centrum.cz> wrote:
> Please, can you advise? I declared function in package:
>
> FUNCTION CheckManufacturersDict RETURN BOOLEAN IS
> result BOOLEAN DEFAULT TRUE;
> BEGIN
> /*
> Calculate result value based on some table values
> */
> RETURN result;
> END CheckManufacturersDict;
>
> PROCEDURE DoSomething IS
> BEGIN
> IF CheckManufacturersDict THEN -- I get error PLS-00307 here
> -- Do osmething
> END IF;
> END DoSomething;
>
> If i try to compile it I get error "PLS-00307 Too many declarations of
> CheckManufacturersDict match this call" on line IF...
>
> But if I change function result to VARCHAR2 instead of BOOLEAN it is
> compiled without any errors:
>
> FUNCTION CheckManufacturersDict RETURN VARCHAR2 IS
> result VARCHAR2(1) DEFAULT 'Y';
> BEGIN
> /*
> Calculate result value based on some table values
> */
> RETURN result;
> END CheckManufacturersDict;
>
> PROCEDURE DoSomething IS
> BEGIN
> IF CheckManufacturersDict = 'N' THEN
> -- Do osmething
> END IF;
> END DoSomething;
>
> How can I make it working with BOOLEAN return type please?
>
> Thank you!

Check the package for another copy of the function with the same footprint (that is, the same name, the same return type, and probably some default parameters.)

Regards,

   Vladimir M. Zakharychev
   N-Networks, makers of Dynamic PSP(tm)    http://www.dynamicpsp.com Received on Tue May 22 2007 - 08:42:42 CDT

Original text of this message

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