Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-06571 HELP!! HELP!! HELP!! HELP!!
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