
BOOLEAN
The BOOLEAN function returns the Boolean value that corresponds to a non-Boolean representation of a Boolean value.
- numeric-expression
- An expression that returns a built-in binary integer or decimal floating-point data type. The result is TRUE if numeric-expression is non-zero and FALSE if it is zero.
- string-expression
- An expression that returns a built-in character string or graphic string data type. Leading and trailing blanks are removed from the string before it is evaluated.
- boolean-expression
- An expression that returns a built-in Boolean data type. The result is the value of boolean-expression.
The result of the function is Boolean. If the argument can be null, the result can be null; if the argument is null, the result is the null value.
Note
Syntax alternatives: The CAST specification should be used to increase the portability of applications. For more information, see CAST specification.
Examples
- Example 1: The following statement returns a value of data type BOOLEAN with the value
TRUE.
VALUES BOOLEAN(1)
- Example 2: The following statement returns a value of data type BOOLEAN with the value
FALSE.
VALUES BOOLEAN('NO')
- Example 3: The following statement returns a value of data type BOOLEAN with the value
TRUE.
VALUES BOOLEAN('Yes')
