SQL MS Access-无效使用Null [英] SQL MS Access - Invalid Use of Null

查看:235
本文介绍了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.

这篇关于SQL MS Access-无效使用Null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆