Solved

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

Posted on 2008-10-28
3
1,520 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 500 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

Independent Software Vendors: 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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

724 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