Progress
SQL-92
Guide and Reference
ROUND Function
Returns the rounded value of a numeric expression.
SYNTAX
EXAMPLE
This example illustrates four calls to the ROUND function. In each case the
num_expression
is 2953861.8320. In the first call therounding_factor
is 2, in the second call therounding_factor
is -2, in the third call therounding_factor
is 0, and in the fourth call norounding_factor
is specified.
NOTES
num_expression
must be numeric or must be convertible to numeric.num_expression
must be one of these supported data types:- If the data type of
num_expression
is not a supported type, ROUND returns an error message.- The
num_expression
is rounded to the next higher digit when:- The
num_expression
is rounded to the next lower digit when:rounding_factor
is an integer between -32 and +32 inclusive, and indicates the digit position to which you want to roundnum_expression
. Figure 4–1 illustrates how the digit positions are numbered. In the figure, thenum_expression
is 2953861.8320.Figure 4–1: ROUND Function Digit Positions
![]()
- If you do not specify a
rounding_factor
, the function roundsnum_expression
to digit 0 (the ones place).- To round to the right of the decimal point specify a positive
rounding_factor
.- To round to the left of the decimal specify a negative
rounding_factor
.COMPATIBILITY
Progress Extension
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |