Function 'myfunc' may not be used in SQL
From: Kevin S <SearleK_at_googlemail.com>
Date: Tue, 7 Oct 2008 08:29:58 -0700 (PDT)
Message-ID: <93a05b41-9c36-4a88-b5db-10e93233884d@m36g2000hse.googlegroups.com>
END myfnc;
Date: Tue, 7 Oct 2008 08:29:58 -0700 (PDT)
Message-ID: <93a05b41-9c36-4a88-b5db-10e93233884d@m36g2000hse.googlegroups.com>
Hello,
I have created a simple function for use in an update statement. The fuction is
FUNCTION myfnc(p1 IN t1.c1%TYPE)
RETURN VARCHAR2
IS
BEGIN
IF p1 = 3 THEN RETURN 'A'; ELSE RETURN 'B'; END IF;
END myfnc;
I use it in a procedure which exists in the same package as the function as follows
Update t1
set c1 = myfnc(c2);
I am getting Function 'myfunc' may not be used in SQL.
There is no db manipulation going on and I have tried using PRAGMA RESTRICT_REFERENCES (myfnc, WNDS, WNPS, RNDS, RNPS); but to no avail.
Any suggestions? Received on Tue Oct 07 2008 - 10:29:58 CDT