OT My weekly tip: how to execute several appends without commit

  • From: "Juan Cachito Reyes Pacheco" <jreyes@xxxxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 12 Apr 2004 13:35:35 -0400

Tom Kyte gave a good idea to do several inserts in a table, based on
distinct state in tables
without doing a commit.

For example
/*+append */ insert into a select * from b
(several process modify b) then
/*+append */ insert into a select * from b

The solution is very simple

(initial situation)
SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER into nscn FROM DUAL;

(several process modify b) then

/*+append */    insert into a
select * from b AS OF SCN nscn
union all
select * from b

I think this is the science of the obvious.

Juan Carlos Reyes Pacheco
OCP
Database 9.2 Standard Edition


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: