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

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-14551: cannot perform a DML operation inside a query

Re: ORA-14551: cannot perform a DML operation inside a query

From: Martin Haltmayer <Martin.Haltmayer_at_d2mail.de>
Date: Thu, 23 Aug 2001 18:53:43 +0200
Message-ID: <3B853517.B9DAC2BD@d2mail.de>


Hi Daud,

you have to define your function with pragma autonomous_transaction.

Regards,

Martin

Daud wrote:
>
> Hi
>
> I have written a pl/sql function that returns a value.
> The function will insert or update into a table everytime it is
> called.
> However, everytime I call the function from a select statement like:
>
> select getVal('data') from dual;
>
> I got an error message like below.
>
> ORA-14551: cannot perform a DML operation inside a query
>
> I think I understand why. However, is there a workaround to this
> problem? I need to call the function from a select statement and the
> function needs to insert/update a table.
>
> thanks
> Daud11
Received on Thu Aug 23 2001 - 11:53:43 CDT

Original text of this message

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