REGR_VALX

functionsupportedCore SQL functions

docs.snowflake.com ↗

Conditional expression functions

Returns NULL if the first argument is NULL; otherwise, returns the second argument. Note that REGR_VALX is a NULL-preserving function, while the more commonly-used NVL is a NULL-replacing function.

Syntax

REGR_VALX( <y> , <x> )

Parameters

NameRequiredDescription
y:requiredAn expression that evaluates to type FLOAT or DECFLOAT or that can be cast to type FLOAT or DECFLOAT.
x:requiredAn expression that evaluates to type FLOAT or DECFLOAT or that can be cast to type FLOAT or DECFLOAT.

Returns

If any of the input expressions is of type DECFLOAT, the returned type is DECFLOAT. Otherwise, the returned type is FLOAT.