Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2003
    Posts
    50

    Question Unanswered: procedure that returns a result set from a called function or stored procedure

    Hi,

    I need to do the following.
    I have about 10 different permutations of input parameters.
    i have to return a result set based on what permutation i get.
    The format of all the results set is always the same
    I know i can do it easily with dynamic sql.
    what i want to do is have one master stored procedure that called other slave stored procedures based on permutations.
    The problem i see, is having the master stored procedure return the result set returned by a slave stored procedure.
    I hope i explained this well

    Here is a rough example

    create or replace procedure master_proc(RSET IN OUT cur.mycur) is
    result1 cur.mycur;
    begin
    slave_proc(result1);
    end;


    CREATE OR REPLACE PROCEDURE slave_proc(RSET IN OUT cur.mycur) IS
    BEGIN
    OPEN RSET FOR select surname,forenames from client_id
    where surname like 'ZA%';
    END;
    /

    Thanks,
    Dave

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713
    create or replace procedure master_proc(RSET IN OUT cur.mycur) is
    begin
    slave_proc(RSET);
    end;
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jun 2003
    Posts
    50
    Thanks A Million.
    So Simple, kicking myself here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •