Re: PL/SQL loop problem
Date: Tue, 13 Aug 2002 12:31:29 +0200
Message-ID: <3D58E001.EE3936B9_at_wifo.ac.at>
> 2. You can not have a commit or rollback within a "cursor for update"
> loop. This is commonly called "commit across fetches". A cursor for
> update, which I think was what you used, will lock the rows that will
> be returned. A commit or rollback will terminate the transaction and
> release the lock on those rows. When you next do a fetch, you will get
> an ORA-1002 "outof sequence" error.
Thanks for your comment. That was just what I wanted to know.
btw. I cannot use "CURRENT OF cursor" because I always have to compare two lines and correct one or both of those. So I need to store them in variables and compare certain fields and then update finding the correct record in an ordinary where clause.
I solved the problem by just updating the last record outside the loop :-)
ad exit: I just forgot it in my posting. I have an exit within the "if %NOTFOUND" clause.
cheers,
Paul
-- ___________________________________________________________________ Österreichisches Institut für Wirtschaftsforschung WIFO Name: Paul Gaggl Postadresse: Postfach 91 Tel.: +43-1-7982601-229 A-1103 Wien Fax: +43-1-7989386 Standort: Arsenal Objekt 20 Mail: gaggl_at_wifo.ac.at A-1030 Wien http://www.wifo.ac.at/Received on Tue Aug 13 2002 - 12:31:29 CEST