Print Thread
Viewing Contents of Returned Object
#44679 10/03/12 06:10 AM
Joined: Jun 2011
Posts: 5
B
Brun Offline OP
Member
OP Offline
Member
B
Joined: Jun 2011
Posts: 5
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.

Re: Viewing Contents of Returned Object
Brun #44681 10/03/12 08:11 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
Do you mean in the debugger? If so, you can right-click on the variable and select "View collection variable".


Marco Kalter
Allround Automations
Re: Viewing Contents of Returned Object
Marco Kalter #44700 10/05/12 04:36 AM
Joined: Jun 2011
Posts: 5
B
Brun Offline OP
Member
OP Offline
Member
B
Joined: Jun 2011
Posts: 5
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

[Linked Image]

Re: Viewing Contents of Returned Object
Brun #44704 10/05/12 10:20 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
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.


Marco Kalter
Allround Automations
Re: Viewing Contents of Returned Object
Marco Kalter #44712 10/07/12 11:14 PM
Joined: Jun 2011
Posts: 5
B
Brun Offline OP
Member
OP Offline
Member
B
Joined: Jun 2011
Posts: 5
This works, that is beautiful thanks heaps will save me a lot of time in the future.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.048s Queries: 14 (0.018s) Memory: 2.5180 MB (Peak: 3.0446 MB) Data Comp: Off Server Time: 2024-05-20 14:57:40 UTC
Valid HTML 5 and Valid CSS