Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: I need a dynamic cursor - how?
Lars Athle Larsen wrote:
> I'm writing a PL/SQL-procedure which uses a cursor. This cursor updates the
> table the cursor is based on, and I need to see the latest values when I run
> my next FETCH-command.
>
> Is this possible, and in that case, how do I do it? I'm running Oracle 9i.
>
> ---
> Lars Athle Larsen
> "If you can't make it work, make it look good"
> - Bill Gates
If you expect a row to have a column value change after your cursor is opened your design isn't valid. A fetch, by definition, is current to the point-in-time (SCN) when the cursor was opened.
I would suggest you look at using SELECT FOR UPDATE.
Daniel Morgan Received on Wed Mar 19 2003 - 15:34:27 CST