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

E17122-08
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

DIVIDEBYZERO

The DIVIDEBYZERO option controls the result of division by zero. (Note that division by zero includes raising zero to a negative power; for example, 0 ** -2.)

Data Type

BOOLEAN

Syntax

DIVIDEBYZERO = YES|NO

Parameters

YES

Allows division by zero. A statement involving division by zero executes without error; however, the result of the division by zero is 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.

NO

(Default) Disallows division by zero. A statement involving division by zero stops executing and produces an error message.

Examples

Example 5-24 The Effect of DIVIDEBYZERO

This example shows the effect of changing the value of the DIVIDEBYZERO option.

When you execute a SHOW statement, 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