title: Union data from cursors into one
body: <p>I have stored procedure which executes another stored procedure several times. I need union and return data, which I have after executing second procedure.</p>
  
  <p>Can I in some way union data from several cursors into one another cursor? It is possible without temporary tables or table-like datatype? </p>
  
  <p>EDIT: Cursor count for union actually is n (where n is 1, 2, 3, etc, detecting by another procedure).</p>
  
  <p>For example:</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE proc_data
  ( data_out OUT SYS_REFCURSOR
  ) IS
  BEGIN
   OPEN data_out FOR SELECT '1' NUM FROM dual;
  END;
  /
  
  CREATE OR REPLACE PROCEDURE proc_result
  ( data_out OUT SYS_REFCURSOR
  ) IS
   data1 SYS_REFCURSOR;
   data2 SYS_REFCURSOR;
  BEGIN
   PROC_DATA(data1);
   PROC_DATA(data2);
   -- select data1 and data2 into data_out - how?
  END;
  /
  
  SET SERVEROUTPUT ON
  
  DECLARE 
   data_out SYS_REFCURSOR;
   temp_row VARCHAR2(10);
  BEGIN
   PROC_RESULT(data_out);
    LOOP
      FETCH data_out INTO temp_row;
      EXIT WHEN data_out%NOTFOUND;
      DBMS_OUTPUT.PUT_LINE(temp_row);
    END LOOP;
    CLOSE data_out;
  END;
  /
  </code></pre>
  
  <p>expected output:</p>
  
  <pre><code>---
  1   
  1   
  </code></pre>