Conditional Expression Functions
booland
returns result of logical (Boolean) AND of x and y Supported Signatures
function booland(decimal(38, 0), decimal(38, 0)) returns boolean
boolnot
returns result of logical (Boolean) NOT of x Supported Signatures
function boolnot(decimal(38, 0)) returns boolean
boolor
returns result of logical (Boolean) OR of x and y Supported Signatures
function boolor(decimal(38, 0), decimal(38, 0)) returns boolean
boolxor
returns result of logical (Boolean) XOR of x and y Supported Signatures
function boolxor(decimal(38, 0), decimal(38, 0)) returns boolean
coalesce
returns the first non-null expression among its arguments Supported Signatures
function coalesce($1, ...) returns $1
decode
compare an expression to search values and returns the matching one Supported Signatures
function decode($1, $1, $1, ...) returns $1
equal_null
Checks if two values are equal, with NULL=NULL semantic Supported Signatures
function equal_null($1, $1) returns boolean
function equal_null(array, array) returns boolean
greatest
returns the largest value from a list of expressions Supported Signatures
function greatest($1, ...) returns $1
greatest_ignore_nulls
returns the largest value from a list of expressions Supported Signatures
function greatest_ignore_nulls($1, ...) returns $1
iff
Returns arg2 if arg1 is true, arg3 otherwise. Supported Signatures
function iff(boolean, $1, $1) returns $1
ifnull
Returns second expression if the first expression is NULL, the first expression otherwise. Supported Signatures
function ifnull($1, $1) returns $1
least
returns the smallest value from a list of expressions Supported Signatures
function least($1, ...) returns $1
least_ignore_nulls
returns the smallest value from a list of expressions Supported Signatures
function least_ignore_nulls($1, ...) returns $1
nullif
Supported Signatures
function nullif($1, $1) returns $1
nullifzero
Returns the 1st input, with values equal to 0 replaced with NULL Supported Signatures
function nullifzero(decimal(38, 0)) returns decimal(38, 0)
function nullifzero(double) returns double
nvl
Returns second expression if the first expression is NULL, the first expression otherwise. Supported Signatures
function nvl($1, $1) returns $1
nvl2
Returns second expression if the first expression is NOT NULL. Returns the third expression otherwise. Supported Signatures
function nvl2($1, $1, $1) returns $1
regr_valx
Returns the value of the dependent variable (2nd param) if both values are not-null. Supported Signatures
function regr_valx(double, double) returns double
regr_valy
Returns the value of the independent variable (1st param) if both values are not-null. Supported Signatures
function regr_valy(double, double) returns double
zeroifnull
Converts to zero if the input is NULL Supported Signatures
function zeroifnull(decimal(38, 0)) returns decimal(38, 0)
function zeroifnull(double) returns double