asp环境中不支持NZ()吗?
sql = "SELECT a.htbh, a.gys, a.htnr, a.htj, SUM(b.fkje) AS fkje_hj, nz(a.htj)-nz(SUM(b.fkje)) AS sc_sqje FROM htsx AS a LEFT JOIN fkmx AS b ON a.htbh=b.htbh GROUP BY a.htbh, a.gys, a.htnr, a.htj HAVING a.htbh='"& htbh &"'"以上代码在SQL中运行是正常可在ASP环境中什么不行了?
在ASP中运行以下代码
sql = "SELECT a.htbh, a.gys, a.htnr, a.htj, SUM(b.fkje) AS fkje_hj, a.htj-SUM(b.fkje) AS sc_sqje FROM htsx AS a LEFT JOIN fkmx AS b ON a.htbh=b.htbh GROUP BY a.htbh, a.gys, a.htnr, a.htj HAVING a.htbh='"& htbh &"'"
当b.fkje没有记录时没a.htj-SUM(b.fkje)计算是错的
难道NZ函数有问题,切望朋友们指点,谢谢!