This is an old revision of the document!


DRAFT

Omnidex SQL Function: CASE

Description

The $ROUND function returns a numeric expression rounded to a specified number of decimal places.

If the value specified by n is positive and longer than the digits after the decimal point, 0 is added after the fraction digits.

If the value specified by n is negative and larger than or equal to the digits before the decimal point, 0.00 is returned.

Syntax

$ROUND(expression [, n])

expression

Required. A valid numerical value. This can be a column in a select statement that will return a numerical value.

n

Optional. n is an integer indicating the number of digits to the right of the decimal. The default is 0.

Example

Example 1

$ROUND(123.4545, 2) result: 123.4500

$ROUND(123.4545, -2) result: 100.0000

$ROUND(123.9994, 3) result: 123.9990

$ROUND(123.9995, 3) result: 124.0000

 
Back to top
dev/sql/functions/round.1260197034.txt.gz ยท Last modified: 2016/06/28 22:38 (external edit)