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!

dynamic cursor for loop. Is that possible?

18338Apr 19 2002
Hi. I have got a %/(%& Cursor problem.

As you see below, it is not allowd to do this with a ref cursor :-(

But how can I do a cursor for loop with different cursor contents??????

Thank you very much

Enjoy the day
Henrik

Cursors and cursor variables are not interoperable; that is, you cannot use one where the other is expected. For example, the following cursor FOR loop is illegal because it attempts to fetch from a cursor variable:

DECLARE
TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;
emp_cv EmpCurTyp;
...
BEGIN
...
FOR emp_rec IN emp_cv LOOP ... -- illegal
END;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 17 2002
Added on Apr 19 2002
2 comments
368 views