Invalid use of null in where statement; no null values

て烟熏妆下的殇ゞ 提交于 2019-12-02 10:03:27

Try this query.

SELECT * FROM QueryA WHERE DblA > 7 AND DblA < 600 AND Dbla IS NOT NULL

Ah, fixed it, still don't know why.

Changed QueryA

SELECT CDbl(Nz(FieldA, 999)) As DblA, Imported.* From Imported WHERE FieldA IS NOT NULL AND Nz(FieldA, 999) <> 999

As far as my SQL knowledge goes this shouldn't make any difference, but it does. If someone can explain it I would welcome it.

The 999 instead of 0 is because else I would get division by 0 errors in other functions (while really Access shouldn't be running any functions with it since it's filtered out).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!