Detecting Not-A-Number (NAN) or +-infinity in Acce

2019-07-09 07:53发布

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条回答
Fickle 薄情
2楼-- · 2019-07-09 08:13

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

DatasheetView.png

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.)

查看更多
登录 后发表回答