Re: Table Function error: wrong number or types of arguments

From: Kevin S <SearleK_at_googlemail.com>
Date: Tue, 26 May 2009 08:44:38 -0700 (PDT)
Message-ID: <dd625b41-5de8-414a-b5c4-b269f70c8824_at_c9g2000yqm.googlegroups.com>



Thanks for that. I got my types and my derived types mixed up.

Corrected function is

CREATE OR REPLACE FUNCTION tablefunction RETURN tab PIPELINED
IS
  rt_a table_a%ROWTYPE;
  my_ntt tab;

  CURSOR my_cur IS
  SELECT *
  FROM table_a;

BEGIN

        For cur in my_cur
        LOOP
          PIPE ROW (ntt(cur.col_aa, cur.col_ab));
        END LOOP;

        RETURN;

END tablefunction;
/ Received on Tue May 26 2009 - 10:44:38 CDT

Original text of this message