![]() Previous |
![]() Next |
The MAINTAIN command with the ADD keyword adds new values to a dimension of type DAY, WEEK, MONTH, QUARTER, and YEAR.
Syntax
MAINTAIN dimension ADD {valuelist|{n PERIODS FIRST}|{n PERIODS LAST}}
Parameters
A non-concat dimension, already defined in an attached analytic workspace.
Specifies that the values in valuelist are to be added to the dimension. When dimension is of type DAY, WEEK, MONTH, QUARTER, or YEAR, then valuelist can be text constants or a TEXT, ID, or DATE expression. When the values are TEXT, they can be in the format specified by the VNF (value name format) for the dimension (or in the default format for the type of dimension you are maintaining when the dimension does not have a VNF) or in a valid input style for date values. When the values are specified as a TEXT expression, each element or line is treated as a separate value.
When the values are in the format specified by the VNF or in the default format for this type of dimension, each value explicitly indicates the time period you want to add. For example, assume that the VNF for a month
dimension is '<MTXT><YY>'
. In this case, the value JAN99
represents the month January 1999.
When you specify a value for a DAY, WEEK, MONTH, QUARTER, or YEAR dimension as a date, you must provide only the date components that are relevant for the type of dimension you are maintaining. For a DAY or WEEK dimension, you must supply the day, month, and year components. For a MONTH or QUARTER dimension, you must supply only the month and year (for example, 'JUN98'
or '0698'
for June 1998). For a YEAR dimension, you must specify only the year (for example, '98'
for 1998). For information about the valid input styles for dates, see the DATEORDER option.
When you add a dimension value by specifying a DATE expression or a TEXT value that represents a complete date, you can specify any date that falls within the time period you want to add. For example, to add the month January 1999, you can specify any date from '01JAN99'
through '31JAN99
'. Oracle OLAP uses the DATEORDER option to resolve any ambiguities.
When adding values to a DAY, WEEK, MONTH, QUARTER, or YEAR dimension that does not yet have values, you must specify only the first and last values you want to add for the dimension. Oracle OLAP automatically fills in the gaps with appropriate values for the intervening time periods.
When a DAY, WEEK, MONTH, QUARTER, or YEAR dimension already has values, you can add values only at the beginning or the end of the existing list. To add values, you must specify only the first or last value you want to add. Oracle OLAP automatically fills in the gap between the existing list and the value you specify.
Specifies the number of periods to add at the beginning or end of an existing list of dimension values.
Examples
Adding Values to Dimension of Type QUARTER
In this example you define a new QUARTER dimension, called qtr
, and you add dimension values for the quarters in 1998 and 1999. You must only add the first and last dimension values you want. Oracle OLAP fills in the intervening values. To add the first and last quarters, you can specify any dates that fall within those quarters.
DEFINE qtr DIMENSION QUARTER MAINTAIN qtr ADD '01jan98' '31dec99'