тип «var» должен быть varchar2:
CREATE OR REPLACE FUNCTION test_pipe
RETURN SYS.odcivarchar2list
PIPELINED
AS
CURSOR cEmploee
IS
SELECT first_name FROM employee;
var employee.first_name%type;
BEGIN
FOR i IN cEmploee
LOOP
DBMS_OUTPUT.put_line (i.first_name);
var := i.first_name;
PIPE ROW (var);
EXIT WHEN cEmploee%NOTFOUND;
END LOOP;
RETURN;
END;
/
select * from table(test_pipe)