Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Write No Package State

Write No Package State

From: Michael Rothwell <michael_rothwell_at_non-hp-usa-om46.om.hp.com>
Date: Tue, 20 Oct 1998 11:46:28 -0700
Message-ID: <362CDA83.BE55E17@non-hp-usa-om46.om.hp.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US