Question

Return pl/sql table contents through ref cursor / convert pl/sql table into cursor

Rating6.4Good

Hi,

I have a oracle stored procedure whose return type is ref cursor.

The data that need to be returned is obtained from looping through the cursors inside SP. In this case, when I return the result through ref cursor i'll get only the last record in the loop. So I stored the records in pl/sql table.
Question1: In this scenario, Is there any other way to retrieve resultset other than using pl/sql table?

Question 2: Assuming that we use pl/sql table to store records, how to transfer data from pl/sql table to ref cursor?
If this is not possible,
Actually, I am accessing this SP in .net application. Is there any way I can return pl/sql table to .net and access data from pl/sql table in .net?  

Please help me.

Thanks in advance,
coolcld

  1. best book for learing PL/sql procedures,trigger…
    best book for learing PL/sql procedures,triggers,cursors(REF CURSOR etc.)it should be easy to understand..
  2. Calling a Stored Proc in Oracle From another - w…
    Hi there, Bit of a beginner question - I need to execute a procedure say Proc1 which returns a ref cursor from another stored procedure Proc_Calling. Now, I need to receive the ref cursor returned by Proc1 and return it from Proc_Calling. All my attempts till now keep throwing up stupid errors. Any help please! Thanks, L x
  3. Func ref cursor
    Following is program that returns ref cursor. How can I display values returns from the function? How can I access this function inside a stored proc?
  4. Oracle Stored Procedure returning an ado record…
    Hi, Can anyone tell me how to return a recordset from a stored procedure that is built by values from multiple cursors? I think I need a temporary table to do this but don't think that option is available in Oracle 8i, and I know a ref cursor is based on sql statements only. Any ideas?
  5. Ref Cursor from PL/SQL table?
    How to return the data in a PL/SQL table to a REF Cursor. The PL/SQL table is created on a Record type. Thanks

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution
View This Solution - Start Your 30 Day Free Trial
Zone
General
Tags
cursor ref convert table
Participating Experts
3
Solution Grade
A

Replies

 
by: alexnuijten

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: Coolcld

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: alexnuijten

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: Coolcld

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: alexnuijten

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: Coolcld

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: slightwv

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by:

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: Coolcld

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: Coolcld

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: slightwv

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: slightwv

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: anand_2000v

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Stay Connected

Oracle Around the Web

The latest Oracle news, tips, and tricks

Oracle Unveils Netra SPARC T3 Servers

New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...

read more

Oracle fixes 21 flaws in Java SE, Java for Business

Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...

read more

Obama’s Silicon Valley “Tech Supper”

Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...

read more

Featured Oracle Experts

slightwv

slightwv has answered more than 2,000 Oracle questions and oversees database management within the U.S. Government. Slightwv

sdstuber

A regular presenter at the Collaborate conference, Oracle developer sdstuber is a top expert in PL/SQL and Oracle 9, 10 and 11. sdstuber

Testimonials

What users are saying about our experts

"The Oracle gurus provide answers, solutions and valuable workarounds"

User: schwertner

"Wow! Excellent, valuable explanation. Hats off to you"

User: aseshu70

"Solution worked fantastic and performs excellent! Thanks heaps"

User: klausbrandlhuber

Top Experts

  1. slightwv

    2,000

    0 points yesterday

    Profile

BrowseBecome an Expert