Monday, June 7, 2010

Checking for NaNs

In Sybase 12.5.4, checking for NaN is very simple - just convert the number to a string and check for the string!
select * from mydata where STR(numcol) like '%NaN%'

From Oracle 10g onwards, this is very simple as a special NaN value is made available for checking against:
select * from mydata where numcol is NaN

No comments:

LinkWithin

Related Posts Plugin for WordPress, Blogger...