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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-06571 HELP!! HELP!! HELP!! HELP!!

Re: ORA-06571 HELP!! HELP!! HELP!! HELP!!

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/10/10
Message-ID: <343e644f.14363313@newshost>#1/1

On Fri, 10 Oct 1997 16:20:09 -0700, Ismael Perez <perez32_at_arrakis.es> wrote:

>Ismael Perez wrote:
>
>Hi All,
>
> I have a problem with a Function. I´m using a function that INSERT
>records in a Table.
>The function is in a Package, the function Return a NUMBER. When I
>called this function from
>an SQL expression, such as:
> SELECT <function-name> FROM DUAL;
>
>Oracle return this Error:
> ORA-06571 Function <function-name> does not guarantee not to Update
>Database
>
>How can I resolve this Error...
>
> Thanks
>
> e-mail: perez32_at_arrakis.es
> ismael_at_eitb.com

You cannot. The basic rule for functions that are to be called from SQL statements is that those functions simply may not modify the database.

Any function that does an insert/update/delete/commit or calls dbms_sql to do any sort of dynamic sql simply cannot be called from a sql statement.

What is it you are trying to do? Perhaps we can suggest a workaround.

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Oct 10 1997 - 00:00:00 CDT

Original text of this message

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