Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Problems executing a Subfunction within PL/SQL
Hi all,
when compiling the following Package there is no error, but when executing
there is the following error:
"Error: SQL ORA-06571: Function GETWARENGRUPPE does not guarantee not to
update database
ORA-06512: at "CATALOGEXPORT", line 16
ORA-06512: at line 1"
The Function "getWarengruppe" is called within a Package from another Function, e.g.
Package Body starts.......
.......
.......
OPEN refcursor FOR
SELECT p1.nr, p1.name, p1.description, t.name,
getWarengruppe(t.catalognr),
p2.hersteller, p2.herstellerartnr, p2.verfuegbarkeit, p2.garantie,
p2.waehrung
FROM products p1, produkt p2, transcatalog t
WHERE p1.nr = p2.produktid
AND t.catalognr = (SELECT c.catalognr
FROM catalog c WHERE c.catalognr = t.catalognr AND c.productnr = p1.nr)
FUNCTION getWarengruppe(CATNR IN VARCHAR2) RETURN VARCHAR2 IS
tempgruppe VARCHAR2(255);
BEGIN
SELECT t.name INTO tempgruppe
FROM transcatalog t
WHERE t.catalognr = (SELECT cs.mothernr
FROM catalogstructure cs WHERE cs.catalognr = CATNR);
Can anyone help me?
Michael
Received on Tue Jun 29 1999 - 05:28:48 CDT