Skip Headers
Oracle® OLAP DML Reference
11g Release 2 (11.2)

Part Number E17122-07
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

DECIMALS

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. (Note, however, that 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.)

Data Type

INTEGER

Syntax

DECIMALS = n

Parameters

n

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. (When you set DECIMALS to 255, you are specifying the formats for values of both SHORTDECIMAL and DECIMAL data types. See "Comparing 2 Decimal Places with Best Presentation Format".) The default is 2.

Examples

Example 5-20 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 5-21 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