我在select查询中有这个等式
监控费用+“CCN费用”+“WkRpt费用”+“MonRpt费用”+“客户仪表板费”+“采取” 控制服务器费+“修补程序管理服务器费”+“远程后台服务器费” 作为“服务器总费用上限”
我看到的一个问题是,只有当每个列中都有值时,它才会添加,但是即使没有数据,我也需要它来添加。
对于远程后台服务器,要到2013年9月才会收取费用。因此,总量上限服务器收费公式不会添加其他的,直到所有的东西都有了值,所以它将从2013年9月开始,而不是所有年份。
发布于 2014-10-08 15:46:01
一些列正在返回NULL。您需要使用ISNULL来返回0而不是NULL。例如:
ISNULL("Monitoring Fees", 0) +
ISNULL("CCN Fees", 0) +
ISNULL("WkRpt Fees", 0) +
ISNULL("MonRpt Fees", 0) +
ISNULL("Client Dashboard Fees", 0) +
ISNULL("Take Control Servers Fees", 0) +
ISNULL("Patch Management Servers Fees", 0) +
ISNULL("Remote Background Servers Fees", 0) as "Total Capped Server Fees"我假设您使用的是Server。
如果您使用的是MySQL,那么等效的函数是IFNULL。例如:
IFNULL("Monitoring Fees", 0) +
IFNULL("CCN Fees", 0) +
IFNULL("WkRpt Fees", 0) +
IFNULL("MonRpt Fees", 0) +
IFNULL("Client Dashboard Fees", 0) +
IFNULL("Take Control Servers Fees", 0) +
IFNULL("Patch Management Servers Fees", 0) +
IFNULL("Remote Background Servers Fees", 0) as "Total Capped Server Fees"https://stackoverflow.com/questions/26261018
复制相似问题