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

Home -> Community -> Mailing Lists -> Oracle-L -> SQL-callable functions

SQL-callable functions

From: Karen Huguley <khuguley_at_MAIL.CASI.STI.NASA.GOV>
Date: Tue, 5 Mar 1996 12:36:06 -0500
Message-Id: <9603041800.AA09320@alice.jcc.com>

     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.gov

Received on Mon Mar 04 1996 - 13:00:38 CST

Original text of this message

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