Re: how to commit one command in a transaction ?

From: Dan Norris <dann_at_sky.net>
Date: 24 Apr 1998 09:19:56 -0500
Message-ID: <6hq72c$rh2$1_at_sky.net>


To my knowledge, what you are asking Oracle to do is impossible. However, if you modified your code to use a savepoint after the first insert statement, you could rollback to that savepoint and then commit which would give the desired result. Otherwise, you could run your first insert, commit, and then do the rest of the inserts and commit those either individually or all of them together.

Dan

ebole_feysot_at_bigfoot.com (Eric Bole-Feysot) writes:

>Hi all

>I have a problem I can't figure out:

>Look at this code :

>insert into logs values ('I do that');
>insert...
>update..
>insert..
>insert... (crash)
> rollback;
> insert into logs value(error);
> commit;

>So, I have only one record in my logs table :
> error

>I would like to have the two records :
> I do that
> error

>In fact, I thing it could be possible to commit only the insert into
>logs command without ending transaction, but How

>Thanks

>- Eric -

>*----------------------------------------------------------*
>Bole-Feysot Eric - BOBST SA - Switzerland

>ebole_feysot_at_bigfoot.com (remove underscore to reply)
>*----------------------------------------------------------*
Received on Fri Apr 24 1998 - 16:19:56 CEST

Original text of this message