| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> Standalone Function
Hi,
I have a standalone function created as following:
CREATE OR REPLACE FUNCTION Canceltest(aExternalReference CHAR)
RETURN NUMBER AS vProductId TEST.productId%TYPE;
vProductRowId ROWID;
vAmount TEST.Amount%TYPE;
BEGIN
SELECT RowId , amount
INTO vProductRowId, vAmount
FROM TEST
WHERE ExternalReference = aExternalReference;
IF (vAmount > 30) THEN
UPDATE TEST
SET Amount = 999
WHERE RowId = vProductRowId;
END IF;
RETURN (1);
EXCEPTION WHEN OTHERS THEN RETURN (-1);
END Canceltest;
The function was created without error, but when I tried to use it I had following error:
SQL> select canceltest('WN.D.18065824') from dual; select canceltest('WN.D.18065824') from dual
*
ERROR at line 1:
ORA-06571: Function CANCELTEST does not guarantee not to update database
Please help me to fix this. Received on Thu May 04 2000 - 16:05:16 CDT
![]() |
![]() |