title: PLS-00231: Function may not be used in SQL
body: <p>I want to test my pipelined function without creating a package. The following example is simplified:</p>
  
  <pre><code>DECLARE
      FUNCTION testDC RETURN NCOL PIPELINED IS
      BEGIN
          PIPE ROW(5);
      END;
  BEGIN
      FOR cur IN (select * from table (testDC())) LOOP
          dbms_output.put_line('--&gt; ');
      END LOOP;
  END;
  </code></pre>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>ORA-06550: line 7, column 7: pls-00231: function TESTDC may not be used in SQL<br>
    ORA-06550: line 7, column 7: PL/SQL: ORA-00904: : invalid identifier<br>
    ORA-06550: line 7, column 7: PL/SQL: SQL Statement ignored</p>
  </blockquote>
  
  <p>What is better way to test these function?</p>