Skip Headers

Oracle® OLAP DML Reference
10g Release 1 (10.1)

Part Number B10339-02
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
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

CHGDIMS

The CHGDIMS function changes the dimensionality of an expression or changes the dimension status during the evaluation of expression.

Return Value

Data type of the original expression.

Syntax

CHGDIMS(expression { LIMIT valueset-list | TO dimension-list | ADD dimension-list } )

Arguments

expression

The expression you want to modify.

LIMIT valueset-list

Sets the current status list of the dimensions of expression to the values specified by valuelist while Oracle OLAP evaluates expression.

TO dimension-list

Specifies that Oracle OLAP evaluate the expression as though the dimensions of expression are the dimensions specified by dimension-list.

ADD dimension-list

Specifies that Oracle OLAP evaluate the expression as though the dimensions of expression are the dimensions of expression plus the dimensions specified by dimension-list

Examples

Assume that you have the following objects in your analytic workspace.

DEFINE PRODUCT DIMENSION TEXT
DEFINE GEOG DIMENSION TEXT
DEFINE SALES VARIABLE INTEGER <PRODUCT GEOG>
 

Assume, also, that the sales variable has the following values.

-------------------SALES-------------------
               ------------------PRODUCT------------------
GEOG            Trousers    Skirts    Dresses     Shoes
-------------- ---------- ---------- ---------- ----------
USA                    13         20         32         18
Canada                 17         32         15         28
 

The following lines of code show how the value returned by a TOTAL(sales) expression varies depending on how you qualify that expression.

"Total over all dims with standard status
SHOW TOTAL(sales)
175
 
"Total over all dims using new status for product
SHOW CHGDIMS(TOTAL(sales) LLIMIT LIMIT(product TO FIRST 2))
82
 
"Total just over product
SHOW TOTAL(CHGDIMS(sales TO product))
83