Question

Asked on 2006-09-12 at 06:39:28ID: 25467426

Call Function with multiple rows into a stored procedure

by: sval1411250

Rating7.8Very Good

This is very urgent. I have a function which returns a single column having different values. And I need to call it from a stored procedure which has 4 input paramaters and  a RefCursor.

I am not sure whether I am building the function right. Does a function return multiple rows? Right now the function I created has a RefCursor too.So, I am not sure how I can call another Refcursor into the Stored Proc.

Please let me know which is the right way to approach this.

Thanks in advance.
This is the function i created

CREATE OR REPLACE FUNCTION TST_FN
           ( P1          IN varchar2,
            P2         IN varchar2,
             P3       IN varchar2,
             P4        IN varchar2,
             P5        IN NUMBER,
             P6        IN NUMBER
                )
     return  SYS_REFCursor is
    l_cursor               SYS_REFCursor;
begin
 
open l_cursor for
  select ....;
return ( l_cursor  );
end;

  1. How to pass the returning value of a function in a…
    I have an oracle function which returns value as sys_refcursor. How to use the recordset of sys_refcursor in another query. For example, Select * from sys_refcursor of the function.
  2. refcursor returntype from oracle in ssis package
    i need to use oracle stored procedure returning refcursor in SSIS package. What is the best way of doing this ?
  3. Returning Varchar2 from function
    Hello, i have following function: CREATE OR REPLACE function item_desc(a in number) return varchar2 is temp varchar2(100); begin select item_desc into temp from items where item_key= a; return temp; end; / using this function i create a view as below: create or replace vie…
  4. function to return values from multiple tabes
    I have 3 tables : table B - with the fields : User_ID, A_ID, B_ID table B_T - with the fields User_ID, T_NAME, T_ID table B_T_XREF with the fileds B_ID, T_ID, T_SEQ_NO For each record in table B, there maybe 1 or more entries in Table B_T. My goal is to retrieve A_ID, and the associated T_NAME. ie, for e…
  5. Store Procedure not returning results
    I am trying to return a recordset in PL/SQL using a cursor. When I execute the qry inside the Store procedure by itself it works. When I execute the SP it doesn't anything. Below is the Store procedure: create or execute procedure spGetPlayerbyTeam(name varchar2, playerByTeam out sys_refcursor) as Begin Open playerByTe…

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
multiple stored function rows procedure
Participating Experts
3
Solution Grade
B

Replies

 by: schwertner

Posted on 2006-09-12 at 07:10:39ID: 28279973

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: sujith80

Posted on 2006-09-12 at 07:46:53ID: 28279974

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: sval1411

Posted on 2006-09-12 at 10:22:27ID: 28279975

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: cjard

Posted on 2006-09-13 at 01:54:59ID: 28279976

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: sval1411

Posted on 2006-09-13 at 10:23:07ID: 28279977

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: sujith80

Posted on 2006-09-13 at 23:17:02ID: 28279978

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: sval1411

Posted on 2006-09-15 at 07:57:50ID: 28279979

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: sval1411

Posted on 2006-09-15 at 08:08:59ID: 28279980

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 2006-09-22 at 01:01:03ID: 28279981

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