1.存储过程
create or replace package PP_CastIronOut is
— Public type declarations
type V_CUR is ref cursor; –定义游标
。。。。
procedure ElementsQuery(c_in_date1 varchar2, –记账日期
p_cusor out V_CUR –游标
) as
begin
open p_cusor for
select a.c_batchnumber,
c.c_itemvalue,
d.c_itemvalue,
e.c_itemvalue,
f.c_itemvalue,
a.c_accdate
from (select distinct c_batchnumber, c_accdate
from tp_pp_puddingoutput) a
left join tq_proquote b
on a.c_batchnumber = b.c_steelno
left join tq_proquoteitem c
on b.c_proquoteid = c.c_proquoteid
and c.c_item = ‘FE0002’
left join tq_proquoteitem d
on b.c_proquoteid = d.c_proquotei