CURSOR FOR LOOP Results to Display in GRID in TOAD

I would like to write a script containing a CURSOR and FOR LOOP within the standard editor window in TOAD. I want the results to display in the GRID not the DBMS Output tab or SCRIPT output tabs.

Basically I want to write to the data GRID.

Is there a way to do this?

Thank you!

Hi!

The grid shows only the result of SQL not of PL/SQL. So direct output is not possible afaik.

But why do you need to use the cursor and the for loop, could you not use plain SQL instead?

Another way could betthe use of (pipelined) table function, if the logic of your script reclaims the use of PL/SQL.

BR

fdi

HI BR/fdi,

Thank you for your response. I have a CURSOR FOR LOOP since I have to write out 12-15 rows for each one of the rows returned from the cursor.

I now wrote to the DBMS output. There is a “save as” capability that will save the output as a txt file.

That is working for me.

Thank you!