Oracle9i OLAP Developer's Guide to the OLAP DML Release 2 (9.2) Part Number A95298-01 |
|
Working with Expressions, 3 of 11
An expression is dimensioned by a union of the dimensions of all the variables, dimensions, relations, formulas, qualified data references, and functions in the expression.
Item |
Dimensioned By |
Comments |
---|---|---|
Formula |
The dimensions listed in the definition of the object |
Example 1: If the Example 2: If the |
Qualified data reference |
All of the dimensions of the associated object, except for the dimensions being qualified |
Qualified data references are described in "Specifying a Single Value for the Dimension of an Expression". |
Function |
In most cases, the union of the dimensions of its input arguments |
Unless otherwise noted in the OLAP DML Reference, when you specify breakout dimensions or relations in an aggregation function, you change the dimensionality of the expression. The first dimension that you specify as a breakout dimension is the slowest varying and the last dimension that you specify is the fastest varying. |
You can find out the dimensions of an expression with the PARSE
command and the INFO
function. PARSE
evaluates the text of an expression; the INFO
function indicates how the expression is interpreted.
This example illustrates the use of the DIMENSION
keyword with the INFO
function to retrieve the dimensions of the expression just analyzed by the PARSE
command. The following commands produce the output shown below them.
PARSE 'TOTAL(sales region)' SHOW INFO(PARSE DIMENSION) REGION
The number of values an expression yields depends on the dimensions of the expression and the status of those dimensions. An expression yields one data value for each combination of dimension values in the current status. For example, if three dimension values are in status for month
, and two for product
, then the expression price
gt
100
results in six values (3 times 2).
Thus, to get the desired results, you must ensure that the dimensions of an expression are limited to the range of data you want to consider. In addition, you must take into consideration any PERMIT
commands that might limit access to the dimensions of the data.
See Also:
Chapter 6, "Selecting Data" for more information about setting the status of a dimension. |
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|