Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-02 |
|
|
View PDF |
The $AGGREGATE_FROM property specifies the same behavior as that specified by a FROM clause in an AGGREGATE command or an AGGREGATE function. By adding an $AGGREGATE_FROM property to a variable you can ensure this behavior when the variable is aggregated — even when it is aggregated by an AGGREGATE statement does not include the FROM clause.
Both the $AGGREGATE_FROM property and the FROM clause specify an object from which Oracle OLAP obtains the detail data for the aggregation.
Syntax
You add or delete an $AGGREGATE_FROM property to the most recently defined or considered object (see DEFINE and CONSIDER) by issuing a PROPERTY statement:
To add the property, issue the following statement.
PROPERTY '$AGGREGATE_FROM' fromspec
To delete the property, issue the following statement.
PROPERTY DELETE '$AGGREGATE_FROM'
Arguments
An arbitrarily dimensioned variable, formula, or relation from which the detail data for the aggregation is obtained.
Examples
Example 8-3 Using the $AGGREGATE_FROM Property
Example 8-30, "Aggregating into a Different Variable" uses the following AGGREGATE command to populate the total_sales_exclud_north
variable with aggregate values computed from the sales
variable.
AGGREGATE total_sales_exclud_north USING agg_sales_exclud_north FROM sales
You can place a $AGGREGATE_FROM property on the total_sales_exclud_north
variable by issuing the following statements.
CONSIDER total_sales_exclud_north PROPERTY '$AGGREGATE_FROM' 'sales'
Now you can aggregate the data by issuing the following AGGREGATE command that does not include a FROM clause.
AGGREGATE total_sales_exclud_north USING agg_sales_exclud_north