Parameters (String value1, String value2, String value_if_equal, String value_if_not_equal);
Returns: BOOLEAN;
Performs an equality check on 2 string values (value1 and value2) and returns the value_if_equal parameter if they are equal, value_if_not_equal otherwise.
Notes on Use:
- If both values are NULL, TRUE is value_if_equal is returned
- Non-String values (numeric or boolean) will be converted to strings for comparison
- The comparison is case sensitive
- Note that value_if_equal and value_if_not_equal will be converted to strings in the returned value. You can wrap the result in GET_NUMERIC_VALUE, TO_BOOLEAN or TO_DATE to convert back to the required type as required.
Examples:
- IFEQUALS('Hello', 'World', TRUE, FALSE) = 'true'
- IFEQUALS('Hello','HELLO','value1','value2') = 'value2'
- IFEQUALS(NULL,NULL,1,0) = '1'
- IFEQUALS('100',100,100,0) = '100'
IFEQUALS(10,10.0,'equal','not equal') = 'not equal'
Comments
0 comments
Please sign in to leave a comment.