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 exampleSELECT IS_DECIMAL(variant_get(PARSE_JSON('{"price": 19.99}'), '$.price'))
-- TRUE
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.
| Input | Result |
|---|---|
| VARIANT decimal | TRUE |
| VARIANT other type | FALSE |
| VARIANT null | FALSE |
| SQL NULL | NULL |