hi all,
I wrote this package with a pipelined function return a type created within package, it is showing data in select statement on my sqlplus window but same statement why not working in oracle forms 12c, both screen shots also attached for reference.
create or replace package pkg_temp as
--
cursor cur_emp is (select
cast ('A' AS VARCHAR2(20)) emp\_name,
cast ('D' AS VARCHAR2(30)) dept\_name,
cast (to\_date(sysdate) AS DATE) hiring\_date,
cast (0 AS NUMBER) salary,
cast (0 AS NUMBER) annual\_salary
from dual);
--
type emp_table_type is table of cur_emp%rowtype;
--
function get_emp (dno number) return emp_table_type PIPELINED;
end;
/
create or replace package body pkg_temp is
--
function get_emp (dno number) return emp_table_type PIPELINED
is
xx number := 0;
begin
for rec in (select e.ename, d.dname, e.hiredate, e.sal, round(e.sal\*12) ann\_sal
from emp e, dept d
where e.deptno = dno
and d.deptno = e.deptno)
loop
pipe row (rec);
end loop;
return;
end get_emp;
--
end pkg_temp;
/

regards