if V_zzxgl is null then V_zzxgl:=0; end if;
if V_zzxgl_wj is null then V_zzxgl_wj:=0; end if;
if V_zzxgl_wd is null then V_zzxgl_wd:=0; end if;
if V_bwgl is null then V_bwgl:=0; end if;
if V_clgl is null then V_clgl:=0; end if;
if V_djgl is null then V_djgl:=0; end if;
if V_dlfg is null then V_dlfg:=0; end if;
if V_bjgl is null then V_bjgl:=0; end if;
if V_zhuandiao is null then V_zhuandiao:=0; end if;
if V_dcdj is null then V_dcdj:=0; end if;
if V_zongdiao is null then V_zongdiao:=0; end if;
if V_zongzdgl is null then V_zongzdgl:=0; end if;
if V_zongzdgl_wj is null then V_zongzdgl_wj:=0; end if;
if V_zongzdgl_wd is null then V_zongzdgl_wd:=0; end if;
-------------------------------------------------------------
应该去除,没有比如如此判断,sum出来不会是null
if V_zzxgl_wj is null then V_zzxgl_wj:=0; end if;
if V_zzxgl_wd is null then V_zzxgl_wd:=0; end if;
if V_bwgl is null then V_bwgl:=0; end if;
if V_clgl is null then V_clgl:=0; end if;
if V_djgl is null then V_djgl:=0; end if;
if V_dlfg is null then V_dlfg:=0; end if;
if V_bjgl is null then V_bjgl:=0; end if;
if V_zhuandiao is null then V_zhuandiao:=0; end if;
if V_dcdj is null then V_dcdj:=0; end if;
if V_zongdiao is null then V_zongdiao:=0; end if;
if V_zongzdgl is null then V_zongzdgl:=0; end if;
if V_zongzdgl_wj is null then V_zongzdgl_wj:=0; end if;
if V_zongzdgl_wd is null then V_zongzdgl_wd:=0; end if;
-------------------------------------------------------------
应该去除,没有比如如此判断,sum出来不会是null
open p_rc for sqlstr;
close p_rc;
end;
---------------
是作什么的?
open p_rc for sqlstr;
close p_rc;
end;
是用来返回前面插入GETNEWJB3表的数据集的
前面还建立一个包
create or replace package pkg_pub
as
type GETNEWJB1 is ref cursor; end pkg_pub;
前面好几个存储过程都调用了这个包中的GETNEWJB1游标
如果SUM出来的没有数据的话那值是什么空值还是0还是NULL???
那我应该怎么做呢
如果不关有什么影响?
而且我查出来的数据全是0
但我数据库里面的不可能是全0的啊
open p_rc for sqlstr;
返回了一些数据集到客户端显示啊如果在不影响显示的情况下应该如何关闭呢??
或者有更好的返回数据集的办法
因为是从SQL SERVER转过来,很多的思维模式都是按照以前来思考的
把close p_rc;去掉