Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> SQL-callable functions
Hi,
I wrote a standalone (i.e., not packaged) PL/SQL function that is callable by SQL. The function does not update any tables (it reads one, though) - only performs calculations. When I call it from SQL, I get: ORA-06571 "Function CALC_WORKDAY does not guarantee not to update database". So, I put this function in a package with the following specification: create or replace package abc_pkg is function calc_workday (datein IN date) return number; PRAGMA RESTRICT_REFERENCES (calc_workday,WNDS); end abc_pkg; / Now, when I recompile, I get: "PLS-00452: Subprogram 'CALC_WORKDAY' violates its associated pragma". What am I doing wrong? I can email the function if necessary. Environment: RDBMS v7.1.6, PL/SQL 2.1.6.2.0, Solaris 2.4. Thanks in advance, Karen DBA, NASA Center for Aerospace Information khuguley_at_casi.sti.nasa.govReceived on Mon Mar 04 1996 - 13:00:38 CST
![]() |
![]() |