Skip to main content

Categories: Boolean

ISNUMERIC

Determines whether an expression is a numeric type (INT, BIGINT, DECIMAL, DOUBLE, FLOAT) or a string that represents a number, with an optional sign, digits, and an optional decimal point with digits. Returns TRUE for these inputs and FALSE for other types, non-matching strings, and NULL. The check is locale-independent and does not accept scientific notation, commas, currency symbols, or whitespace.

Syntax​

ISNUMERIC(expression any) → boolean​

  • expression: Can be a general expression of any Dremio-supported data type. For varchar inputs, checks whether the string can be parsed as a number.

Examples

ISNUMERIC example
SELECT ISNUMERIC('13579')
-- True
ISNUMERIC with a decimal string
SELECT ISNUMERIC('4.2')
-- true
ISNUMERIC with a signed string
SELECT ISNUMERIC('-42')
-- true
ISNUMERIC example
SELECT ISNUMERIC('Hello World!')
-- False
ISNUMERIC with a NULL input
SELECT ISNUMERIC(NULL)
-- false
ISNUMERIC example
SELECT ISNUMERIC(passenger_count)
FROM "Samples"."samples.dremio.com"."NYC-taxi-trips"
LIMIT 1
-- True