[英]SQL isNull is not working
I have a sentence similar to this one: 我有一句话与此相似:
SELECT ISNULL(sum(PARTE.AFECTADO_ENP_ARBOLADO),0) arbolado
FROM INCENDIO
And I don't know how to work with IsNull
because this is returning some field with null value. 而且我不知道如何使用IsNull
因为这将返回一些具有空值的字段。
Try like this : 尝试这样:
SELECT SUM(ISNULL(PARTE.AFECTADO_ENP_ARBOLADO,0),0) arbolado FROM INCENDIO
Initially it will IS NULL will look for values and then it will Aggregate those values 最初它将是NULL,将查找值,然后将这些值汇总
请尝试这个
SELECT SUM(ISNULL(PARTE.AFECTADO_ENP_ARBOLADO,0)) as Arbolado FROM INCENDIO
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.