Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Package function problems
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
![]() |
![]() |