23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ROUND<br />

ROUND<br />

Syntax<br />

120<br />

• string_exp and the result can contain multi-byte characters. count represents the number<br />

of characters.<br />

Compatibility<br />

ODBC compatible<br />

Returns the rounded value of a numeric expression.<br />

ROUND ( num_expression [, rounding_factor ] ) ;<br />

Example This example illustrates four calls to the ROUND function:<br />

-- rounding_factor 2 returns 2953861.83<br />

ROUND ( 2953861.8320, 2 )<br />

-- rounding_factor -2 returns 2953900.00<br />

ROUND ( 2953861.8320, -2 )<br />

-- rounding_factor 0 returns 2953862.00<br />

ROUND ( 2953861.8320, 0 )<br />

-- No rounding_factor argument also returns 2953862.00<br />

ROUND ( 2953861.8320 )<br />

In each case the num_expression is 2953861.8320. In the first call the rounding_factor is 2,<br />

in the second call the rounding_factor is -2, in the third call the rounding_factor is 0, and in<br />

the fourth call no rounding_factor is specified.<br />

Notes • num_expression must be numeric or must be convertible to numeric.<br />

• num_expression must be one of these supported data types:<br />

– INTEGER<br />

– TINYINT<br />

– SMALLINT<br />

– NUMBER<br />

– FLOAT<br />

– DOUBLE PRECISION<br />

• If the data type of num_expression is not a supported type, ROUND returns an error<br />

message.<br />

• The num_expression is rounded to the next higher digit when:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!