title: fetch from function returning a ref cursor to record
body: <p>I have a function in a package that returns a REF CURSOR to a RECORD. I am trying to call this function from a code block. The calling code looks like this:</p>
  
  <pre><code>declare      
     a_record package_name.record_name; 
     cursor c_symbols is select package_name.function_name('argument') from dual;
  
  begin 
     open c_symbols;   
     loop            
          fetch c_symbols into a_record;
          exit when c_symbols%notfound;              
     end loop;
     close c_symbols; 
  end;
  </code></pre>
  
  <p>The function declaration as part of package_name looks something like this:</p>
  
  <pre><code>TYPE record_name IS RECORD(
        field_a       varchar2(20);
  );
  
  TYPE record_cursor IS REF CURSOR RETURN record_name;
  
  FUNCTION getsymbols(argument IN varchar2) return record_cursor;
  </code></pre>
  
  <p>When I try to run the calling code block, I get the exception: PLS-00386: type mismatch found at 'EXAMPLE_SYMBOLS' between FETCH cursor and INTO variables.</p>
  
  <p>What should the type of a_record be and how can I access individual elements of the record I am fetching(of type record_name)?</p>