title: How do you query a nested type field from a record set returned from a function?
body: <p>I have the following types defined:</p>
  
  <pre><code>TYPE N_TXT IS TABLE OF VARCHAR2(300);
  
  TYPE N_TYPE IS RECORD ( FIELD_1 VARCHAR2 (100)
                         , FIELD_2 N_TXT);
  
  TYPE T_TYPE IS TABLE OF N_TYPE;
  </code></pre>
  
  <p>And created a function to return a table record type:</p>
  
  <pre><code>FUNCTION fn_test (p_1 IN SMALLINT) RETURN t_type PIPELINED ....
  </code></pre>
  
  <p>I can then query the result set from this:</p>
  
  <pre><code>SELECT * FROM TABLE (fn_test(P_1)); 
  </code></pre>
  
  <p>to retrieve all the data.</p>
  
  <p>If field_2 had multiple records e.g. 3 records the out put will return something like this:</p>
  
  <pre><code>FIELD_2
  
  ++++++++++++++++++++++++++++++
  
  N_TYPE(record1, record2, record3)
  </code></pre>
  
  <p>How do you unwrapped field_2 to select individual records from the nested type for processing?</p>