Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-02 |
|
|
View PDF |
The ZSPELL option holds the default text that is used for representing numeric zero values in output produced by the HEADING, REPORT, and ROW commands.
Data type
TEXT
Syntax
ZSPELL = {'text'|'OFF'}
Arguments
The spelling to use as the default spelling for numeric zero values. When you specify an expression rather than a text literal, you can omit the single quotes.
(Default) Shows a zero (0) with the appropriate number of decimal places (determined by a DECIMAL attribute) for each numeric zero value.
Notes
Assigning Zero Values
ZSPELL affects output only; it does not affect the way you assign a zero value. For example, even when you have set ZSPELL to NONE
, you still assign a zero value as follows.
var1 = 0
Showing Decimal Places
The default of OFF means that a zero value is shown as 0 (zero), with the number of decimal places indicated by a DECIMAL attribute (for example, 0.00
). When you set ZSPELL to the text character 0
, zero values are shown as a 0
with no decimal places, regardless of any DECIMAL specification.
Effect of ZSPELL on Values Close to Zero
When your output includes a small number, such as 0.004
, the number of decimal places shown affects whether ZSPELL treats the number as zero. See Example 26-52, "Showing Very Small Numbers".
Examples
Example 26-51 Showing Zero Values as NONE
This example changes the value of ZSPELL, so that a zero value in the DECIMAL variable testvar
is shown as NONE in report output. When ZSPELL is set to its default value of OFF
, the Oracle OLAP statements
testvar = 0.00 ROW testvar
produce the following output.
0.00
In contrast, these OLAP DML statements
ZSPELL = 'NONE' ROW testvar
produce the following output.
NONE
Example 26-52 Showing Very Small Numbers
This example illustrates how the number of decimal places shown in output affects whether ZSPELL treats very small numbers as zeros. When ZSPELL is set to its default value of OFF
, these OLAP DML statements
ZSPELL = 'OFF' testvar = 0.004 ROW DECIMAL 3 testvar
produce the following output.
0.004
The following statements set ZSPELL to NONE
and specify two decimal places for the output.
ZSPELL = 'NONE' ROW DECIMAL 2 testvar
These statements produce the following output.
NONE
With ZSPELL still set to NONE
, the following statement specifies three decimal places for the output.
ROW DECIMAL 3 testvar
This statement produces the following output.
0.004