Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: COMMIT in for loop
> > 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