Is there a way to perform a Cursor For Loop with an dynamic SQL-statement?
If I don't want to declare a record I can do something like this (only if I declared the cursor..):
For I in cuSelect Loop
dbms_output.put_line(I.NAME);
End Loop;
And I can open a cursor for a dynamic SQL-statement:
Open cuSelect For 'Select * From TAB_X';
Fetch ceSelect Into recSelect;
Close cuSelect;
But to do that I have to first declare the Record.
Now my problem is that I have to open the Cursor for a very big and complicated dynamic SQL-statement. The structure of the record is unknown. Is there a way to open a variable cursor and iterate through it with an "undeclared" record?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…