TD_ISNAN Examples - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

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