以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  SQLCompute 后台统计  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=55191)

--  作者:东方孟德
--  发布时间:2014/8/12 14:44:00
--  SQLCompute 后台统计

  dr("总额")= dt3.SQLCompute("Sum(费用1+费用2+培训费3)",  " [合同编号] = \'" & SS & "\'" )语句,sqserver库。

 费用1,费用2,培训费3  3个字段有一个字段数值缺省为空时,汇总出的总额为空,都有数时正常。 请教如何解决?


--  作者:Bin
--  发布时间:2014/8/12 14:46:00
--  
dt3.SQLCompute("Sum(费用1)",  " [合同编号] = \'" & SS & "\'" )+dt3.SQLCompute("Sum(费用2)",  " [合同编号] = \'" & SS & "\'" )+dt3.SQLCompute("Sum(培训费3)",  " [合同编号] = \'" & SS & "\'" )