## Scalar Numeric Functions

## Scalar numeric functions

## Result

ABS Returns the absolute value of the given numeric expression. See The ABS Function. ASCII_CODE Returns the ASCII code value of the leftmost character in the given string expression, as an integer. See The ASCII_CODE Function. BIT_LENGTH Returns the number of bits in a string. See The BIT_LENGTH Function. CHAR_LENGTH or CHARACTER_LENGTH Returns the length of a string. See The CHAR_LENGTH Function. CURRENT_VALUE Returns the current value of a sequence. See The CURRENT_VALUE Function. DAYOFWEEK Returns the day of the week for the given date expression, expressed as an integer value in the range

1-7, where 1 represents Monday. See The DAYOFWEEK Function. DAYOFYEAR Returns the day of the year for the given date expression, expressed as an integer in the range 1-366. See The DAYOFYEAR Function. EXTRACT Extracts a single field from a DATETIME or INTERVAL value. See The EXTRACT Function. IRAND Returns a random integer number. See The IRAND Function. MOD Returns the remainder (modulus) of a specified integer expression divided by a second specified integer expression. See The MOD Function. NEXT_VALUE Returns the next value in the series of values defined by a sequence, provided that last value in that series has not already been reached. See The NEXT_VALUE Function. OCTET_LENGTH Returns the octet (byte) length of a string. For single-octet character sets this is the same as CHARACTER_LENGTH. See The OCTET_LENGTH Function. POSITION Returns the starting position of the first occurrence of a specified string expression in a given character string, starting from the left of the character string. See The POSITION Function. ROUND Returns the given numeric expression rounded to the number of places to the right of the decimal point specified by a given integer expression. See The ROUND Function.If the integer expression is negative, the numeric expression is rounded to a number of places to the left of the decimal point specified by the absolute value of the integer expression. SIGN Returns an indicator of the sign of the given numeric expression. See The SIGN Function.If the numeric expression is less than zero, -1 is returned. If the numeric expression is equal to zero, 0 is returned. If the numeric expression is greater than zero, 1 is returned. TRUNCATE Returns the given numeric expression truncated to a number of places to the right of the decimal point specified by a given integer expression. See The TRUNCATE Function.If the integer expression is negative, the numeric expression is truncated to a number of places to the left of the decimal point specified by the absolute value of the integer expression. WEEK Returns the week of the year for the given date expression, expressed as an integer value in the range

1-53. See The WEEK Function.

Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |