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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: insert and commit 1000 records at a time

Re: insert and commit 1000 records at a time

From: Maryann Atkinson <maryann_30_at_yahoo.com>
Date: Fri, 17 Oct 2003 13:04:32 -0800
Message-ID: <F001.005D382A.20031017130432@fatcity.com>


At 04:44 PM 10/17/2003, you wrote:

Got it, thanks to both of you, I really appreciate it. maa

>MaryAnn,
>To get back to the original question, use a MOD function on rownum to get
>your commit point. Check the docs to make sure, but try
>If mod(rownum, 1000) = 0
>then
> commit;
>end if;
>Daniel Fink



Organization: Fat City Network Services, San Diego, California Precedence: bulk
  1. Define a variable to count inserted rows. insert_count number := 0;
  2. Increment it after inserting the row insert_count:=insert_count + 1;
  3. Check if insert_count = 1000 then commit and reset counter to zero insert_count :=0;
  4. At the end when no rows found, and insert_count > 0 then commit.

I think you get the idea....

>MaryAnn Atkinson wrote:
>
> > I still dont get it...
> > I dont know what I have done to have me confused more
> > than I first asked the question...
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.net
>--
>Author: Daniel Fink
> INET: Daniel.Fink_at_Sun.COM
>
>Fat City Network Services -- 858-538-5051 http://www.fatcity.com
>San Diego, California -- Mailing list and web hosting services
>---------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Maryann Atkinson
  INET: maryann_30_at_yahoo.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Oct 17 2003 - 16:04:32 CDT

Original text of this message

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