Re: WHAT IS ORA-6571

From: Ken Mizuta <kmizuta_at_jp.oracle.com>
Date: 1996/07/10
Message-ID: <31E3EBAD.482B_at_jp.oracle.com>#1/1


It is valid to use PL/SQL functions within SQL statements, however, the function has to be guaranteed not to change the database in any way.

For instance:
CREATE FUNCTION FTEST(A NUMBER)
RETURN NUMBER
BEGIN
  INSERT INTO DUMMY VALUES (A);
  RETURN A;
END; SELECT FTEST(1) FROM DUAL;
--> This select statement will result in ORA-6571.

Bob Yeh wrote:
>
> Hi,
>
> I got the following message when execute a function in the SQL*PLUS.
> The function gets the next sequence number from a sequence.
>
> ERROR at line 1:
> ORA-06571: Function GETSEQUENCE does not guarantee not to update database.
>
> Can soneone tell me what this is.
> The message book does not have ORA-6571 to ORA-5680.
>
> Please E-mail me if possible.
>
> Thanks. Bob
 

-- 
                  ____________________________________________ 
                 /    Kenichi Mizuta 
      ////      /     Oracle Corporation (Redwood Shores, CA) 
     |0 0|     /      Applications Division 
_ooO_ \U/_Ooo_/       email: kmizuta_at_us.oracle.com 
The comments and opinions expressed herein are mine and
do not necessarily represent those of Oracle Corporation.
Received on Wed Jul 10 1996 - 00:00:00 CEST

Original text of this message