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: Update in Oracle Function.

Re: Update in Oracle Function.

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sat, 30 Oct 1999 10:57:31 -0400
Message-ID: <FwcbOHMAV11aZwpJsTJI9IWSLnF=@4ax.com>


A copy of this was sent to Sudheer K G <kgsudhi_at_my-deja.com> (if that email address didn't require changing) On Sat, 30 Oct 1999 09:14:16 GMT, you wrote:

>Hello All,
>
>Is it possible to write an update statement in an Oracle Standalone
>Function? When I tried it gave me the error "ORA-06571: Function X_UPD
>does not guarantee not to update database" What does it really mean? Is
>it any other way to do this using functions? (ORACLE 7.3)
>

Yes you can BUT you cannot 'select' that function. You would execute it. For example:

begin dbms_output.put_line( f(x) ); end; /

instead of

select f(x) from dual;

a select cannot write to the database (until Oracle8i, release 8.1 with autonomous transactions that is).

>Appreciate all the helps..
>
>Sudheer
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Sat Oct 30 1999 - 09:57:31 CDT

Original text of this message

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