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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Commit during insert

Re: Commit during insert

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Thu, 16 Aug 2001 10:35:07 +0100
Message-ID: <3b7b93cc$0$233$ed9e5944@reading.news.pipex.net>


You can do this using PL/SQL

pseudo code below

CURSOR C_REMOTE IS
<some select statement>

FOR remote_rec in C_REMOTE LOOP

    IF i mod 1000 THEN

                <insert statement>
                COMMIT;
    ELSE
                <insert statement>

   END IF
    i:= i + 1
END LOOP This sort of logic will commit every 1000 records.
--
Niall Litchfield
Oracle DBA
Audit Commission UK
"GREGORY KNESER" <gregoryk_at_futures.wharton.upenn.edu> wrote in message
news:9lenhs$o8p$1_at_netnews.upenn.edu...

> Hello,
>
> I need some help creating an ETL like script.
>
> I'm going to pull data from a remote table, insert it into a local table,
> and I want to perform commits and give updates to the user along the way
to
> let them know how far it is in the process. Is there some way to pass a
> hint or set some parameter so that Oracle will commit after X rows have
> been inserted? I can figure out reporting to the user if this first
> problem is taken care of.
>
> Thanks,
> Greg
Received on Thu Aug 16 2001 - 04:35:07 CDT

Original text of this message

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