PLS-00307 Too many declarations of ...



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!



.



Relevant Pages


Loading