Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

howto return reference cursor that also updates

10626Mar 29 2005 — edited Mar 21 2006
Hi,
I have a stored function that returns a reference cursor. The reference cursor query contains a field that is used as a flag to select on:

type refCursor is ref cursor;

function fname( ) return refCursor
is
begin
open my_cursor for
select ...
from table1, table2, ...
where table1.flag = 0 and ...;

return my_cursor;
end;

I would like to know if there is a way to set the table1.flag field to 1 in each record within the result set after the cursor has been closed or at the cursor poition while it is being read from? And if so, how to accomplish this.

Thanks,
David

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 18 2006
Added on Mar 29 2005
19 comments
686 views