日期:2014-05-17 浏览次数:20685 次
create or replace function F_GET_HLTS_TEST(bkh in varchar2, xh in integer, hldm in varchar2) return number is
Result number(10,3);
hlzts number(10,3);
begin
select case when sum(sl) is null then 0 else sum(sl) end as hlzts into Result from t_z_brfy_mx where bkh_zy = bkh and ryxh=xh and yzbm =hldm and fyzt = '1';
return(Result);
end F_GET_HLTS_TEST;
select F_GET_HLTS_TEST('0729450',1,'H0003') FROM DUAL;