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: I need a dynamic cursor - how?

Re: I need a dynamic cursor - how?

From: DA Morgan <damorgan_at_exxesolutions.com>
Date: Wed, 19 Mar 2003 13:34:27 -0800
Message-ID: <3E78E263.18784369@exxesolutions.com>


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

Original text of this message

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