Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-02 |
|
|
View PDF |
The PARENS option controls whether negative numbers are represented in output with parentheses or a minus sign.
Data type
BOOLEAN
Syntax
PARENS = {YES|NO}
Arguments
Encloses negative values in parentheses, instead of using a minus sign.
(Default) Uses a minus sign to represent negative values.
Notes
Overriding PARENS
The setting of the PARENS option is overridden by a PAREN or NOPAREN attribute in a HEADING, REPORT, or ROW command. The PAREN attribute specifies the use of parentheses; the NOPAREN attribute specifies the use of a minus sign.
Allowing Space for Parentheses
When you use parentheses to represent negative values in a report, Oracle OLAP lines up the positive and negative values in the column. To do this, it reserves the right-most character in each numeric column for the closing parenthesis. The column is always reserved, even when there are no negative values in the output. Consequently, each value requires more space than when you use the minus sign, and you might need to increase your column width to accommodate your data.
Examples
Example 21-26 Showing Negative Values in Parentheses
In a report, you would like to show negative values in parentheses, so you first set PARENS to YES
.
LIMIT line TO 'Cogs' LIMIT division TO 'Sporting' LIMIT month TO 'Jan96' TO 'Jun96' PARENS = YES DECIMALS = 0 REPORT DOWN month budget actual budget-actual
These statements produce the following output.
DIVISION: SPORTING --------------LINE-------------- --------------COGS-------------- BUDGET-ACT MONTH BUDGET ACTUAL UAL -------------- ---------- ---------- ---------- Jan96 279,773 287,558 (7,785) Feb96 323,982 315,299 8,683 Mar96 302,178 326,185 (24,007) Apr96 386,101 394,544 (8,443) May96 433,998 449,862 (15,864) Jun96 448,042 457,348 (9,305)