SQL MS Access-无效使用Null
问题描述:
我现在通过强制较长时间摆脱了该查询的溢出,但是现在我得到了
I have now got rid of the overflow on this query by forcing to a long but now I get
错误94:无效使用NULL
谁能告诉我可能是什么问题?
Can anyone tell me what the problem could be?
SQL查询:
Sum(CLng(
[TotaalPrijs]/([tbl_ArtikelsPerOrder]![Aantal]*[Totaal])*
[tbl_ArtikelVerwijderdUitZaaglijst]![Aantal]
)) AS GezaagdeOmzet
答
一个或多个列值是NULL
,并且无法将其转换为整数,因此会导致此错误.尝试将值包装在Nz
函数中,例如Nz([My_value],0)
One or more of the column values is NULL
, and this can not be converted to an integer so is causing this error. Try wrapping the value in the Nz
function e.g. Nz([My_value],0)
如果找到NULL
,这将强制其返回0
.
This will force it to return 0
if a NULL
is found.