| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1555 人关注过本帖
标题:这个过程那里有错???
只看楼主 加入收藏
shizhusz110
Rank: 1
等 级:新手上路
帖 子:307
专家分:0
注 册:2006-12-21
收藏
 问题点数:0 回复次数:2 
这个过程那里有错???
CREATE OR REPLACE
procedure UpdateSHGL_CJ(
 i_cjrq in date,
 i_hm in varchar,
 i_dqbh in number,
 i_hmlb in char,
 i_wxcj  in number,
 i_bdhf in number,
 i_bdct in  number,
 i_bdgj in number,
 i_yhl in number,
 i_dlsbh_sb in number
)
as
declare
 h1  number(10,2):=0.49;
 s1  number(10,2):=0.41;
 h2  number(10,2):=0.25;
 s2  number(10,2):=0.25;
 A1  number(10,2):=i_bdhf;
 B1  number(10,2):=i_bdgj;
 C1  number(10,2):=i_bdct;
 D1  number(10,2):=i_yhl;
 F1  int:=100000;
 G1  int:=100;
 I1  number(10,2):=0.05;
 F2  int:=200000;
 G2  int:=100;
 I2  number(10,2):=0.10;
 E1  int:=30;
 E2  int:=60;
 i_yfcj number(10,2):=0.00;
 i_hmcj number(10,2):=0.00;
 i_sbcj number(10,2):=0.00;
 i_dlsbh number:=0;
 i_sbdls number:=0;
 i_hmcj number(10,2);
 i_sbcj number(10,2);
 total1  number(10,2):=A1+B1+C1;
 total2  number(10,2):=i_bdct+(1/(3*B1));
 total3  number(10,2):=(1-D1)*total1;
 begin
---------------------------------------
select sum(dlsbh) into i_dlsbh from SHGL_CJQD where cjrq=i_cjrq;
select sum(dlsbh_sb) into i_sbdls  from SHGL_CJQD where cjrq=i_cjrq;
-------------------------------------------
if i_hmlb='1' then
  if (total2 >=E1) then
   i_hmcj:=H1 * total3;
   i_sbcj:=S1* total3;
  end if;
else --2
   if total1>=F2 then--2.1
    if (total1 >= G2) then--2.1.1
     i_hmcj:=(H2+I2)*total1;
     i_sbcj:=S2*total1;
    end if;
    if (total2>=E2 and total<G2) or (i_dls=i_sbdls) then--2.1.2
     i_hmcj:=H2*total1;
     i_sbcj:=S2*total1;
    end if;
   end if;--end2.1
   if total1>=F1 and total1<F2 then--2.2
    if total1 >=G1 then--2.2.1
     i_hmcj:= (H2+I1)*total1;
     i_sbcj:=S2*total1;
    end if;
    if (total2>=E2 and  total2<G1)or (i_dls=i_sbdls) then--2.2.2
     i_hmcj:=H2 * total1;
     i_sbcj:=S2*total1;
    end if;
   end if;--end2.2
   if total1<F1 then--2.3
    i_hmcj:=H2*total1;
    i_sbcj:=S2*total1;
   end if;--end2.3
end if;
 --------------------------
if i_dls=i_sbdls then--3
  i_yfcj:=i_hmcj+i_sbcj;
else
  i_yfcj:=i_hmcj;
end if;
 ---------------------------------
 update SHGL_CJQD
 set
  total=total1,
  yfcj=i_yfcj,
  hmcj=i_hmcj,
  sbcj=i_sbcj
 where hm=i_hm and cjrq=i_cjrq;
 end;
end;
搜索更多相关主题的帖子: number yhl bdct bdgj bdhf 
2008-02-28 09:50
ILoveMK
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:487
专家分:0
注 册:2007-2-12
收藏
得分:0 
你编译或运行的时候应该有提示错误的吧。。。

天下归心
2008-02-28 13:10
shizhusz110
Rank: 1
等 级:新手上路
帖 子:307
专家分:0
注 册:2006-12-21
收藏
得分:0 
呵呵 解决谢谢!
2008-02-28 13:30
快速回复:这个过程那里有错???
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013993 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved