TD_ISNAN Examples - Teradata Vantage

Database Unbounded Array Framework Time Series Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
ncd1634149624743.ditamap
dita:ditavalPath
ruu1634160136230.ditaval
dita:id
ncd1634149624743

Existing Sales Table

The table is named orders1, and contains a NaN in the column Sales.

StoreID SEQ Sales
101 1 2.01000000000000E 002
101 2 **********************
101 3 2.03000000000000E 002

Example: TD_ISNAN Call to Determine If There are NaNs

SELECT StoreID, SEQ, TD_ISNAN(sales) AS NaN_in_Sales FROM orders1;

TD_ISNAN Output to Determine If There are NaNs

StoreID SEQ NaN_in_Sales
------------------------
101     1    0
101     2    1
101     3    0

Example: TD_ISNAN Call to Determine Count of NaNs

SELECT COUNT(*) FROM orders1 WHERE TD_ISNAN(sales) = 1;

TD_ISNAN Output from Count Call

Count(*)
-----------
1