Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> ORA-06571: Function CALC_AVG does not guarantee not to update database
I have written this as a function and as a package. The function works
just fine, but when I try to call the same function within a package I
get this error. Any Suggestons? There is nothing but select statemnts
in the function just calculating an average against criteria that I can
use in a view.
Function CALC_AVG (CTID in varchar2, ASSAYTR in varchar2, ATYPE in varchar2)
return number
is
TRP_AVG NUMBER(8,3); BEGIN select avg(decode(operator,'=',result,null))
into
TRP_AVG from
secondary_results
where
assayid = ASSAYTR and
sampleid = CTID and
datatype = ATYPE;
return (TRP_AVG); Received on Mon Oct 11 1999 - 12:04:30 CDT