Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> No FOR loops for cursor variables?
I want to do this...
DECLARE
TYPE MY_CURSOR_TYPE IS REF CURSOR RETURN my_table%ROWTYPE;
my_cursor MY_CURSOR_TYPE;
BEGIN
OPEN my_cursor FOR SELECT * FROM my_table;
FOR my_cursor_rec IN my_cursor
LOOP
dbms_output.put_line(my_cursor_rec.name);
END LOOP;
END;
It doesn't work. I've about reached the conclusion that cursor FOR loops
don't work for cursor variables. Is this true? I can't think of any
logical reason why FOR loops couldn't be implemented for REF CURSORs. Can
someone explain this to me please?
To reply, replace "no.spam.please" with "curtis.duhn" in the following email
address:
no.spam.please_at_usa.xerox.com
Thanks,
Curtis Duhn
Received on Mon May 18 1998 - 15:20:07 CDT
![]() |
![]() |