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 -> Re: Write No Package State

Re: Write No Package State

From: <Clive>
Date: Wed, 21 Oct 1998 20:38:10 GMT
Message-ID: <362e45bb.956960@news.demon.co.uk>


On Tue, 20 Oct 1998 11:46:28 -0700, Michael Rothwell <michael_rothwell_at_non-hp-usa-om46.om.hp.com> wrote:

>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

Does the function call any other functions - if so do have you checked to ensure that they have the pragma declared?

Clive Bostock
--
Clive Bostock Received on Wed Oct 21 1998 - 15:38:10 CDT

Original text of this message

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