![]() Previous |
![]() Next |
The MAINTAIN command with the DELETE keyword deletes dimension members from non-concat dimensions.
Note: You can also issue a MAINTAIN DELETE statement for a surrogate dimension that has a Maintain trigger. In this case, Oracle OLAP only executes the Maintain trigger program; no other action occurs. See "Trigger Programs" for more information for more information. Issuing a MAINTAIN statement for a surrogate dimension that does not have a Maintain trigger, returns an error. |
Syntax
MAINTAIN dimension DELETE limit-clause
Parameters
A non-concat dimension, already defined in an attached analytic workspace, whose values are to be deleted.
Note: You cannot use a dimension surrogate as the dimension argument of a MAINTAIN DELETE command. However, you can use a dimension surrogate as a value within the limit-clause parameter. |
Specifies the values to delete from the dimension.
The syntax of limit-clause is the same syntax as any of the limit-clause arguments in the various forms of the LIMIT command (that is, the syntax of the LIMIT command after the limit-type argument such as "TO"). For the syntax of these arguments, see LIMIT (using values) command, LIMIT using LEVELREL command, LIMIT (using parent relation), LIMIT (using related dimension) command, LIMIT NOCONVERT command, and LIMIT command (using POSLIST).
Usage Notes
Deleting Temporary Calculated Members From Dimensions
When you use a MAINTAIN DELETE statement to delete a temporary calculated member, Oracle OLAP:
Deletes the member from the dimension.
Removes the calculation from all aggmap objects that currently contain the corresponding calculation.
Deleting Values in an Integer Dimension
When you use MAINTAIN to delete values in an INTEGER dimension, the values are renumbered to keep the normal sequence of INTEGER
values (1, 2, 3, ...).
Examples
Deleting Dimension Values by Value
This statement deletes Omaha
and Newark
from the values for city
.
MAINTAIN city DELETE 'Omaha' 'Newark'
Deleting the First Five Values of a Dimension
In this example, you use the INTEGER variable intvar
to remove the first five cities from the dimension city
.
intvar = 5 MAINTAIN city DELETE FIRST intvar
Deleting Dimension Values Based on a Boolean Expression
Here you remove from city
all those cities with a population of less than 75,000 people. You use the variable population.c
, which contains the population for each city.
MAINTAIN city DELETE population.c LT 75000
Deleting Dimension Values Using Surrogate to Specify Values
Assume that prodid
is a NUMBER
dimension and prodtype
is a TEXT
dimension surrogate for prodid
. Assume also that the values of prodid
are 17
, 40
, and 56
. The values of prodtype
are Two-Person Tent
, Three-person Tent
, and Four-person Tent
. The following statement deletes a value from prodid
and from its surrogate.
MAINTAIN prodid DELETE prodid(prodtype 'Three-Person Tent')