Skip to main content

Categories: Datatype, Variant Type

IS_DECIMAL Preview

Returns TRUE if the input expression is a VARIANT<DECIMAL>.

Syntax

IS_DECIMAL(value VARIANT) → BOOLEAN

  • value: The VARIANT value to check.

Examples

IS_DECIMAL example
SELECT IS_DECIMAL(variant_get(PARSE_JSON('{"price": 19.99}'), '$.price'))
-- TRUE
IS_DECIMAL example
SELECT IS_DECIMAL(variant_get(PARSE_JSON('{"name": "Alice"}'), '$.name'))
-- FALSE

Usage Notes

NULL handling for VARIANT inputs

If the input is SQL NULL (e.g., from a missing path), IS_DECIMAL returns NULL.

InputResult
VARIANT decimalTRUE
VARIANT other typeFALSE
VARIANT nullFALSE
SQL NULLNULL