IS_*
Purpose
This function returns TRUE
if string
can be converted to a certain data type. For example, if IS_NUMBER
returns TRUE
, you can
convert the string using TO_NUMBER
.
Syntax
is_datatype::=
Usage Notes
- If one of the arguments is
NULL
, thenNULL
is returned. - If a format is specified, then the rules of the corresponding TO functions apply (TO_NUMBER, TO_DATE, TO_TIMESTAMP). For additional information, refer to Numeric Format Models section.
Example
SELECT IS_BOOLEAN('xyz') IS_BOOLEAN,
IS_NUMBER('+12.34') IS_NUMBER,
IS_DATE('12.13.2011', 'DD.MM.YYYY') IS_DATE;
Result
IS_BOOLEAN | IS_NUMBER | IS_DATE |
FALSE | TRUE | FALSE |