Viewing Contents of Returned Object

Brun

Member
Hi,

When i have a procedure or function which returns an object eg

create or replace type varchar2_table as table of varchar2(4000);

is there an easy way to quickly just open this type from plsql developer test/sql window rather than having to iterate through the values and DBMS_OUTPUT'ing them to view them.

I think i have done it once before but for the life of me i cant find how to do it.
 
Do you mean in the debugger? If so, you can right-click on the variable and select "View collection variable".
 
Hi,

If i am in the window in the screenshot i run the code and then right click the 'tab_cust_dtl' and hit 'view collection variable' and it doesn't do anything

screenshot.jpg

 
I see. You can open a cursor to fetch the table data:

Code:
begin
  pkg_data_feeds.prc_get_customer_details(...);
  open :table_cursor for select * from table(tab_cust_dtl);
end;

After declaring the :table_cursor in the variable section and executing the script, you can press the cursor value cell button to open the results in a SQL Window.
 
Back
Top