Skip Headers
Oracle® OLAP DML Reference
10g Release 2 (10.2)

Part Number B14346-01
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 -

[CACHE] LIMITSAVE | [CACHE] LIMIT valueset-list | TO dimension-list | ADD dimension-list })

Arguments

expression

The expression you want to modify.

CACHE

Specifies that Oracle OLAP caches the result of the limit and saves it for use in subsequent executions of CHGDIMS until the OLAP DML statement that called CHGDIMS finishes execution.

LIMITSAVE

Specifies that Oracle OLAP uses the current status list of the dimensions of expression while Oracle OLAP evaluates expression.

LIMIT valueset-list

Specifies that Oracle OLAP uses 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) LIMIT(product TO FIRST 2)))
82
 
"Total just over product
SHOW TOTAL(CHGDIMS(sales TO product))
83