Numeric functions achieve various purposes:
ABS(), CEILING(), FLOOR(), MOD(), SIGN() and TRUNC() execute the corresponding mathematical functions on the specified numeric expressions.
CHARACTER_LENGTH( ), OCTET_LENGTH( ) and POSITION( ) calculate the number of bytes or code units in a string or the position of a string in another string.
JULIAN_DAY_OF_DATE( ) converts a date into an integer value.
EXTRACT() extracts specific components of a time value.
When a numeric function is evaluated, a numeric value is returned.
numeric_function ::=
{
ABS ( expression ) |
CEIL[ING] ( expression ) |
FLOOR ( expression ) |
MOD ( dividend,divisor ) |
SIGN ( expression ) |
TRUNC ( expression ) |
{ CHAR_LENGTH | CHARACTER_LENGTH } ( expression [USING { CODE_UNITS | OCTETS }]) |
OCTET_LENGTH ( expression ) |
POSITION ( expression IN expression [USING CODE_UNITS]) |
JULIAN_DAY_OF_DATE ( expression ) |
EXTRACT ( part FROM expression )
}
expression
In ABS(), CEILING(), FLOOR(), MOD(), SIGN() and TRUNC(): numeric expression.
In EXTRACT() and JULIAN_DAY_OF_DATE( ): time value expression.
Otherwise: alphanumeric expression or national expression.
expression may not be a multiple value with dimension > 1.