MAINTAIN DELETE dimension


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 OALP 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.


See also:

MAINTAIN DELETE composite

Syntax

MAINTAIN dimension DELETE dim-arg

Arguments

dimension

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 dim-arg parameter.

dim-arg

Specifies the values to be deleted from the values of a dimension. You can specify these values using the same syntax that you use for limit-clause in the LIMIT command.


See:

There are several types of limit clauses. Because the complete syntax for each type of limit clause is complex, there are individual LIMIT entries for each type of clause:
LIMIT command (using values)
LIMIT command (using LEVELREL)
LIMIT command (using related dimension)
LIMIT command (using parent relation)
LIMIT command (NOCONVERT)
LIMIT command (using POSLIST)

Notes

Deleting Temporary Calculated Members From Dimensions

When you use a MAINTAIN DELETE statement to delete a temporary calculated member, Oracle OLAP:

  1. Deletes the member from the dimension.

  2. 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')

Deleting Related MONTH Values

In this example, you use the related dimension quarter to remove values of the dimension month. All months related to the values of quarter currently in the status are deleted.

LIMIT quarter TO FIRST 1

MAINTAIN month DELETE quarter