Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B10339-02 |
|
|
View PDF |
The DIVIDEBYZERO option controls the result of division by zero.
Data type
BOOLEAN
Syntax
DIVIDEBYZERO = YES|NO
Arguments
Allows division by zero. A statement involving division by zero will execute without error; however, the result of the division by zero will be NA
. When you are dividing by a dimensioned variable or expression, setting DIVIDEBYZERO to YES
enables you to get results for most of the expression's values when a few calculations might involve dividing by zero.
Disallows division by zero. A statement involving division by zero will stop executing and produce an error message. (Default)
Notes
Raising zero to a negative power (for example, 0
**
-2
) is division by zero.
AGGREGATE command and AGGREGATE function
Examples
Example 11-13 The Effect of DIVIDEBYZERO
This example shows the effect of changing the value of the DIVIDEBYZERO option.
When you execute a SHOW command, such as the following, without changing the DIVIDEBYZERO option from its default value of NO
, Oracle OLAP attempts to divide 100 by 0 and then produces an error message.
SHOW 100 / 0
When you change DIVIDEBYZERO to YES
, the same statement executes without error and produces NA
as the result of the division. The statements
DIVIDEBYZERO = YES SHOW 100 / 0
produce the following result.
NA