Logic Functions

SQL Function 1010data Function Description
IF(expr1,expr2,expr3) if(C1;R1;C2;R2;...;D) For SQL, if expr1 is true, then expr2 is returned, otherwise expr3 is returned. For 1010data, the value corresponding to the first condition that evaluates to true is returned; if no conditions are true, the specified default value is returned.
case(X;V1;R1;V2;R2;...;D) For SQL, if expr1 is true, then expr2 is returned, otherwise expr3 is returned. For 1010data, the value corresponding to the case that a given value matches is returned; if no cases match, the specified default value is returned.
IFNULL(expr1,expr2) ifnull(X;Y) For SQL, if expr1 is NULL, then expr2 is returned, otherwise expr1 is returned. For 1010data, a specified value is returned when the value in a given column is N/A.
NULLIF(expr1,expr2) nullif(X;Y) For SQL, if expr1 equals expr2, NULL is returned, otherwise expr1 is returned. For 1010data, if the two given values match, N/A is returned.