?
Solved

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

Posted on 2008-10-28
3
Medium Priority
?
1,524 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 22824618

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 2000 total points
ID: 22827887
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
ID: 31510673
Thank you very much for your kind cooperation! ;-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

752 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