10 Replies Latest reply: Sep 7, 2012 1:09 AM by Billy~Verreynne RSS

    Can we write pipelined function without creating Type objects.

    RamaKrishna.CH
      Hi,
      I want to write pipelined function without Type objects.Is it possible?

      For Ex like below:

      create or replace
      package pipelined_fun
      as
      type txn is record(
      num NUMBER
      ,num1 NUMBER
      );
      type txnhist is table of txn;
      function txnhist_fun(p_mbrsep IN VARCHAR2) return txnhist pipelined;
      END;
      /
      create or replace
      package body pipelined_fun
      as
      function txnhist_fun(p_mbrsep IN VARCHAR2,p_mchdt in varchar2) return txnTable pipelined
      is
      txn1 txn;
      BEGIN
      txn1.num :=1;
      txn1.num :=2;
      PIPE ROW (txn1);
      PIPE ROW (txn1);
      END;

      END;
      /


      Please advice.