if I have
The first step is to define the format of the rows that are going to be returned. In this case here, we're going to return a INT, DATE followed by a VARCHAR2(25).
CREATE OR REPLACE TYPE myObjectFormat
AS OBJECT
(
A INT,
B DATE,
C VARCHAR2(25)
)
/
Next a collection type for the type previously defined must be created.
CREATE OR REPLACE TYPE myTableType
AS TABLE OF myObjectFormat
/
Finally, the producer function is packaged in a package. It is a pipelined function as indicated by the keyword pipelined.
CREATE OR REPLACE PACKAGE myDemoPack
AS
FUNCTION prodFunc RETURN myTableType PIPELINED;
END;
/
CREATE OR REPLACE PACKAGE BODY myDemoPack AS
FUNCTION prodFunc RETURN myTableType PIPELINED IS
BEGIN
FOR i in 1 .. 5
LOOP
PIPE ROW (myObjectFormat(i,SYSDATE+i,'Row '||i));
END LOOP;
RETURN;
END;
END;
/
Test It:
ALTER SESSION SET NLS_DATE_FORMAT='dd.mm.yyyy';
SELECT * FROM TABLE(myDemoPack.prodFunc())
How can I use a function using pipeline in a join with other tables?
pipeline functions and linq
Thank you for the report, we have reproduced the issue.
I will let you know as soon as the problem is fixed.
You can use a temporary workaround - just add the function definition with the return type definition manually to the .lqml file using XML editor in the following way:
I will let you know as soon as the problem is fixed.
You can use a temporary workaround - just add the function definition with the return type definition manually to the .lqml file using XML editor in the following way:
Code: Select all
The problem is fixed. Could you please upgrade to the latest build of dotConnect for Oracle?
It can be downloaded from Registered Users' Area.
It can be downloaded from Registered Users' Area.