Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Write No Package State
I have a package that contains some simple functions
regarding holidays, current workday, etc... Each of these
functions have an associated PRAGMA of "wnds".
One function - "today" returns the current workday of the month ( integer ). When I call the function as part of the select clause in a statement - all works well. If I try to use the function in the WHERE clause of a statement I get the following error:
ORA-06573: Function TODAY modifies package state, cannot be used here
If I include the "wnps" PRAGMA in the function, then I get the following compile error:
PLS-00452: Subprogram 'TODAY' violates its associated pragma
I dont understand why I am getting these errors. How am I modifying the package state?
Michael Received on Tue Oct 20 1998 - 13:46:28 CDT