![]() Previous |
![]() Next |
The OLAP DML is a multidimensional language. Consequently, operations in the OLAP DML apply all at once to an entire set of values. Again, conceptually, you can think of these operations as applying to the values in all of the cells in a variable; or, physically, you can think of these operations as applying to all of the elements in the array that is the variable. Consequently, if you use the OLAP DML assignment statement (that is, SET or =), then you do not need to code explicit loops to assign values to all of the elements in a variable. Instead, when you issue a statement against an object that has one or more dimensions, the statement loops over the values in status for each dimension of the object and performs the requested operation.
Assume, for example, that there is a dimension named prodid
that has three values, Prod01
, Prod02
, and Prod03
, and you have a variable named quantity
that is dimensioned by prodid. As the following code snippet illustrates, if Prod01
, Prod02
, and Prod03
are all in status, when you assign the value 3
to quantity, Oracle OLAP assigns the value 3
to all of the elements in quantity.
quantity = 3 REPORT quantity PRODID QUANTITY -------------- ---------- PROD01 3.00 PROD02 3.00 PROD03 3.00
Other OLAP DML statements (for example, REPORT, ROW, and FOR) also loop through all of the in status elements of a dimensioned object when they execute.