Question

Asked on 2005-06-17 at 00:19:36ID: 25471447

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

by: Coolcld125

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. 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
  2. REF CURSOR PROBLEM IN PACKAGES
    i am newbie in packages.I am calling GET_EMP_DETAILS function in EMP procedure;the function returns reference cursor;EMP_DETAILS cursor defined in package which is of EMPMASTER type.but the function should retreive all the values from three tables i.e EMPCHARGES , EMPMSTR , EMPDTL ;In this case what is the REF CURSOR EMP_DETAILS…
  3. Using REF cursor in a FOR loop
    Hi, I need to create a PL/SQL(Oracle) porcedure thats basically returns a bunch of rows of data based on some logic. This procedure needs to be used as a data source for a Crystal Report. Here is how the code goes procedure p_test (p_start_date date, p_end_date date, p_record_set out types.cursor_type) is v_start_juli…
  4. How to return outer join result via PL/SQL table …
    I have two tables, first table(API) contains basic customer information such as name, site_id; second table(API) contains address details for site_ID I need to use these table(API) to list my customer info with address details. It's just like an outer join if using select statement. However, since those info are passed via API and ref cursor. …
  5. Compare the values from a REF CURSOR in a wh…
    Hi Experts, I have a Stored PL/SQL function which returns a REF CURSOR containing several values (fx. a,b,c) and I need to compare the values with a single value. I need to know how to make the comparement in the where clause (the function below illustrates the problem). FUNCTION myFunc(aValue VARCHAR) RETURN ref_cursor…

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

Posted on 2005-06-17 at 03:07:06ID: 28306014

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

Posted on 2005-06-17 at 03:44:17ID: 28306015

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

Posted on 2005-06-17 at 04:10:19ID: 28306016

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

Posted on 2005-06-17 at 04:17:43ID: 28306017

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

Posted on 2005-06-17 at 05:10:29ID: 28306018

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

Posted on 2005-06-17 at 05:23:41ID: 28306019

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

Posted on 2005-06-17 at 05:28:47ID: 28306020

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:

Posted on 2005-06-17 at 05:37:05ID: 28306021

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

Posted on 2005-06-17 at 05:43:05ID: 28306022

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

Posted on 2005-06-17 at 05:46:20ID: 28306023

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

Posted on 2005-06-17 at 06:15:09ID: 28306024

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

Posted on 2005-06-17 at 07:19:48ID: 28306025

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

Posted on 2005-09-21 at 17:21:15ID: 28306026

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