title: return CURSOR resultset from one stored procedure to another oracle
body: <p>I am facing issues while passing CURSOR resultset from one stored procedure to another in ORACLE. The Values retrieved shows null always.</p>
  
  <pre><code>Create or replace proc_1 (arranged_cursor OUT SYS_REFCURSOR)
  AS
  begin
  ---- here there is query that joins a couple of tables and I get the result. (not saving result set into any temporary table)
  strquery :='SELECT DISTINCT A.COL_A, A.COL_B,B.COL_B FROM T_ALLOC A INNER JOIN T_MAIN B ON A.COL_A= B.COL_A';
  OPEN arranged_cursor for strquery;
  end
  </code></pre>
  
  <p>Next Procedure from where I am calling PROC_1</p>
  
  <pre><code>Create or replace PROC2()
  as CC SYS_REFCURSOR;
  var_A INTEGER;
  var_B INTEGER;
  var_C INTEGER;
  begin
  PROC_1(CC);
  fetch CC INTO var_A,var_B,var_C;
  EXIT WHEN cc%NOTFOUND;
  -- here var_A, var_B and var_c are always null
  END LOOP;
  end;
  </code></pre>
  
  <p>Please help me .. What am I doing wrong? Should I insert the resultset from procedure 1 to temporary table? Only then will it work?
  Please stuck here very badly.</p>