How to declare a %rowtype of a dynamic cursor?
658611Mar 29 2011 — edited Mar 29 2011Hi guys
I need to declare a rowtype variable of a dynamic cursor. Is this possible??
The porpouse of this is to store this rows into a pl/sql table.
Example:
DECLARE
T_CURSOR IS REF CURSOR
MY_C IS T_CURSOR;
MY_RT IS MY_C%ROWTYPE;
TYPE MY_TABLE IS TABLE OF MY_RT INDEX BY BYNARI_INTEGER;
BEGIN
OPEN MY_C FOR 'SELECT * FROM MYTABLE';
FETCH MY_C INTO MY_TABLE(1);
FETCH MY_C INTO MY_TABLE(2);
FETCH MY_C INTO MY_TABLE(3);
FETCH MY_C INTO ...........
END;
Obviously this don“t work, but do somebody know how can I do something for to obtain the same result??
Thanks