Detecting Not-A-Number (NAN) or +-infinity in Access and Sql Server

ε祈祈猫儿з 提交于 2019-12-11 01:28:07

问题


Oracle provides functions to test whether a stored value is NaN or +-infinity. Is there something similar that can be used in Access and Sql Server?


回答1:


Yes, Access can detect "NaN" and "+/-Infinity", at least for values that reside in Double columns of a native Access table:

You can even have Access perform queries like the following, which will return all rows that contain a "NaN" (positive or negative) in the Double column:

SELECT * FROM Table1 WHERE Right(CStr([DoubleField]), 3) = 'NAN';

However, support for those special values could very well be incomplete. For example, I'm not aware of a way to insert or update those values (e.g., CDbl("1.#INF") does not work.)



来源:https://stackoverflow.com/questions/33192022/detecting-not-a-number-nan-or-infinity-in-access-and-sql-server

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