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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Package function problems

Re: Package function problems

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sun, 07 Mar 1999 19:40:11 GMT
Message-ID: <36f0d5f2.18891093@192.86.155.100>


A copy of this was sent to waltdnes_at_interlog.com (Walter Dnes) (if that email address didn't require changing) On Sun, 07 Mar 1999 03:22:40 GMT, you wrote:

> I'm trying to call my own package function from a SELECT
>statement. I get the following error message...
>
>==============================================================
>SQL> SELECT WD.INT_STN_ID('6158733') AS STATION FROM SYS.DUAL;
>ERROR:
>ORA-04068: existing state of packages has been discarded
>ORA-04063: package body "XXXXXXX.WD" has errors
>ORA-06508: PL/SQL: could not find program unit being called
>ORA-06512: at line 1
>==============================================================
>
> I've spec'd the function in package WD like so...
>
> FUNCTION INT_STN_ID(STN7CHAR VARCHAR2) RETURN NUMBER;
> PRAGMA RESTRICT_REFERENCES (INT_STN_ID, WNDS, WNPS);
>
> It basically does a SELECT INTO ...; does some error checking
>and returns either the result, or NULL if an error is found.
>Anyone have any idea what gives?

the package is invalid in the database -- it didn't compile successfully.

In sqlplus issue:

SQL> show errors package body WD;  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Sun Mar 07 1999 - 13:40:11 CST

Original text of this message

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