Package: Simple question from novice
Date: 1997/12/18
Message-ID: <67bj6k$ndi$1_at_news.uni-c.dk>#1/1
[Quoted] [Quoted] I have just started with packages in Personal Oracle7.
First i wrote a standalone function Addfive, called it from SQL*Plus
and it works fine.
Then i deleted the function and put it in a package.
Both the package specification and body compiles fine.
Now it does not work, because i get the following error:
ORA-06571:
Function ADDFIVE does not guarantee not to update database
when i execute the following select statement:
select test_package.addfive(10) from sys.dual;
The package is as follows:
PACKAGE TEST_PACKAGE
IS
FUNCTION AddFive(Amount IN NUMBER)
RETURN NUMBER;
END;
PACKAGE BODY TEST_PACKAGE
IS
FUNCTION AddFive(Amount IN NUMBER)
RETURN NUMBER
IS
BEGIN
RETURN(Amount + 5);
END AddFive;
END Test_Package;
Can anyone tell me what i am doing wrong. It should be so simple
Regards
Magnus
Received on Thu Dec 18 1997 - 00:00:00 CET