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 -> No FOR loops for cursor variables?

No FOR loops for cursor variables?

From: Curtis Duhn <no.spam.please_at_usa.xerox.com>
Date: Mon, 18 May 1998 20:20:07 GMT
Message-ID: <1998May18.202011.27673@news.wrc.xerox.com>


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

Original text of this message

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