Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B1033902 


View PDF 
The DECIMALS option controls the number of decimal places that are shown in numeric output. Values are rounded to fit the specified number of decimal places.
Data type
INTEGER
Syntax
DECIMALS = n
Arguments
An integer expression that specifies the number of decimal places to include in all output of DECIMAL and SHORTDECIMAL values; n can be any number in the range 0 to 40 or the number 255. A value of 255
produces "best presentation" formats. (See "Best Presentation Formats".) The default is 2.
Notes
The setting of DECIMALS does not affect the format of INTEGER values in output. INTEGER values are shown with no decimal places, unless you explicitly apply a DECIMAL attribute to them in a HEADING, REPORT, or ROW command.
When you set DECIMALS to 255
, you are specifying the following formats for numbers:
SHORTDECIMAL values are shown with as many decimal places as can fit into an overall total of 7 significant digits.
DECIMAL values are shown with as many decimal places as can fit into 15 significant digits.
Both DECIMAL and SHORTDECIMAL values are rounded to the last decimal place that is shown, and trailing decimal zeros are dropped. See "Comparing 2 Decimal Places with Best Presentation Format".
Examples
Example 103 Showing Data with No Decimal Places
To show no decimal places in numeric output, set the DECIMALS option to 0
(zero) before you produce your report.
DECIMALS = 0 LIMIT line TO 'COGS' LIMIT month TO 'Jan96' 'Feb96' REPORT DOWN division ACROSS month: budget
These statements produce the following output.
LINE: COGS BUDGET MONTH DIVISION Jan96 Feb96    Camping 355,933 385,308 Sporting 279,773 323,982 Clothing 528,370 546,468
Example 104 Comparing 2 Decimal Places with Best Presentation Format
This example contrasts the effects of setting DECIMALS to 2
and setting it to 255
("best presentation" format).
The OLAP DML statements
DECIMALS = 2 SHOW JOINCHARS(1.1 'A')
produce the following output.
1.10A
The OLAP DML statements
DECIMALS = 255 SHOW JOINCHARS(1.1 'A')
produce the following output.
1.1A