Oracle® OLAP DML Reference 11g Release 2 (11.2) E17122-08 |
|
|
PDF · Mobi · ePub |
The TRIGGERSTOREOK option controls whether you can use $STORETRIGGERVAL properties to specify that NA
values in an object be permanently replaced by the values specified by a $NATRIGGER property.
Important:
The value of the TRIGGERSTOREOK option is only one factor that Oracle OLAP uses to determine what to do with variable data that is the result of $NATRIGGER expression execution. For a discussion of the other factors and their interrelationship, see "How Oracle OLAP Determines Whether to Store or Cache Results of $NATRIGGER".(Default) NA
values are not permanently replaced with the $NATRIGGER property expression that is set for a variable.
NA
values are permanently replaced with the $NATRIGGER property expression that is set for a variable. The default value is NO
.
For Oracle OLAP to permanently replace NA
values for a variable with the valid $NATRIGGER property expression that is set for the variable, you must set both the TRIGGERSTOREOK option and the $STORETRIGGERVAL property for the variable to YES.
About the $NATRIGGER and STORETRIGGERVAL Properties
The TRIGGERSTOREOK option works with the $NATRIGGER and $STORETRIGGERVAL properties of a variable.
Example 5-107 Replacing NA Values Temporarily
This example replaces the NA
values in the cells of a variable temporarily. The following statements define a dimension with three values and define a variable dimensioned by the dimension. They add the $NATRIGGER property to the variable, then put a value in one cell of the variable and leave the other cells empty, so that their values are NA
. Finally, they report the values in the cells of the variable.
DEFINE d1 INTEGER DIMENSION MAINTAIN d1 ADD 3 DEFINE v1 DECIMAL <d1> PROPERTY '$NATRIGGER' '500.0' v1(d1 1) = 333.3 REPORT v1
The preceding statements produce the following output.
D1 V1 --------- ---------- 1 333.30 2 500.00 3 500.00
This statement deletes the $NATRIGGER property from the v1
variable.
CONSIDER v1 PROPERTY DELETE '$NATRIGGER' REPORT v1
The preceding statements produce the following output.
D1 V1 --------- ---------- 1 333.30 2 NA 3 NA
Example 5-108 Replacing NA Values Permanently
The following statements add the $NATRIGGER property to the v1
variable that was defined in the previous example and set the TRIGGERSTOREOK option and the $STORETRIGGERVAL properties to YES. They then report the values in the cells of the variable.
CONSIDER v1 PROPERTY '$NATRIGGER' '800.0' TRIGGERSTOREOK = YES PROPERTY 'STORETRIGGERVAL' YES REPORT v1
The preceding statements produce the following output.
D1 V1 -------------- ---------- 1 333.30 2 800.00 3 800.00
The following statements delete the $NATRIGGER property from the v1
variable and report the values in the cells of the variable.
CONSIDER v1 PROPERTY DELETE '$NATRIGGER' REPORT v1
The preceding statements produce the following output.
D1 V1 -------------- ---------- 1 333.30 2 800.00 3 800.00