title: Copy REF CURSOR to a temporary table
body: <p>Is there a quick way to flush REF CURSOR into a temporary table in oracle
  <BR/>CURSOR size will vary between 5K to 100K rows
  <BR/>currently I am using a for loop, but its very slow
  <BR/>There is no way to change the OUT parameter for SOME_FUNCTION_CALL function.</p>
  
  <pre><code>DECLARE
  v_return SYS_REFCURSOR;
  VAR_A varchar2(100);
  VAR_B varchar2(100);
  
  BEGIN 
   v_return := SOME_FUNCTION_CALL();
  LOOP
  FETCH v_return into VAR_A,VAR_B
  EXIT WHEN v_return%NOTFOUND
            INSERT INTO temp_table(a,b) values (VAR_A,VAR_B);
  END LOOP;
  CLOSE v_return;
  END LOOP;
  </code></pre>