IS Predicate
You use IS to determine whether a particular result is or is not of the given data type. It is useful for cleaning data or validating data input. When applied to row value expressions, all elements must test the same.
The IS predicate takes the following form:
IS [NOT] FORM
Examples:
x IS FLOAT
y IS NOT INTEGER
is true if x is float in form; y is true if the form is not an integer. If x is a string, then this is true if the value is a number that can be stored as a specified data type.
The following IS predicates are supported:
'IS [NOT] FLOAT'
'IS [NOT] INTEGER'
'IS [NOT] DECIMAL'
'IS [NOT] INGRESDATE'
'IS [NOT] ANSIDATE'
'IS [NOT] TRUE/FALSE'
'IS [NOT] UNKNOWN'
If all values in a column pass this predicate, the whole column can be coerced into the specified form.
The following predicates are all true:
' +12345 ' IS FLOAT
'1.000000' IS FLOAT
' +12345 ' IS INTEGER
'123 456' IS NOT INTEGER
DECIMAL('1234567890123456789012345', 25,0) IS DECIMAL
'number' IS NOT DECIMAL
DECIMAL('1234567890123456789012345', 25,0) IS FLOAT
SELECT 'date' IS INGRESDATE
if date is INGRESDATE in form.
x IS NULL
if x is a null.
Last modified date: 12/20/2023