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 in for loop

Re: COMMIT in for loop

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 22 Jun 1999 15:58:08 -0700
Message-ID: <37701500.92284DC7@exesolutions.com>


> > I am getting an Oracle internal error when doing a COMMIT
> > inside a FOR loop in my PL/SQL procedure. Are you not
> > allowed to do that? It was working before, in fact it
> > works for about 200000 rows before it crashes. Thanks
> > for any help you can give.

There is no problem commiting inside of a loop with Oracle with the exception of using dynamic sql. Not that it shouldn't work but with some versions it does what you describe. I would institute a counter and commit either more frequently or less frequently. Another alternative is to add a where clause to your cursor and perform the actions in several different loops rather than just one. First loop handles values between A.. and H.., second loop values between I.. and P.., etc.

Daniel A. Morgan Received on Tue Jun 22 1999 - 17:58:08 CDT

Original text of this message

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