Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Forms 12c: Pipelined function not working in Forms

Ahmed HaroonNov 28 2017 — edited Nov 30 2017

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;

/

ScrShot.jpg

regards

This post has been answered by Keyser on Nov 28 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 28 2017
Added on Nov 28 2017
10 comments
1,200 views