Solved

Insert an object of type ref cursor into a table ( Oracle PL/SQL )

Posted on 2008-10-28
3
1,497 Views
Last Modified: 2013-12-18
  PROCEDURE ALPHA (
      BETA       IN       NUMBER,
      GAMMA_LIST   IN OUT   c_list,
      DELTA       OUT      INTEGER
   )
   IS .....


The c_list type is REF CURSOR.

In order to debug, how could I download the c_list content into a table?
0
Comment
Question by:hc2342uhxx3vw36x96hq
3 Comments
 
LVL 29

Expert Comment

by:MikeOM_DBA
Comment Utility

Try this in sqlplus:

var beta number;

var gamma_list refcursor;

var delta number;

exec :beta:=-1;

exec PROCEDURE ALPHA (:beta,:gamma_list,:delta);

print delta;

print gamma_list;

Open in new window

0
 
LVL 27

Accepted Solution

by:
sujith80 earned 500 total points
Comment Utility
c_list - is opened for a query.
You may
1. print the query using dbms_output.put_line
2. if you want to see the run time data of the ref cursor; you may create a table for debug purpose corresponding to the query and insert data into the table.
3. of the query changes at run time, you may use dynamic sql to do "create table as" using the query of the ref-cursor.
0
 
LVL 1

Author Closing Comment

by:hc2342uhxx3vw36x96hq
Comment Utility
Thank you very much for your kind cooperation! ;-)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now