|Oracle® OLAP DML Reference
11g Release 2 (11.2)
|PDF · Mobi · ePub|
For dimensions of type DAY, WEEK, MONTH, QUARTER, or YEAR, the BEGINDATE function returns the first date of the first time period in dimension status for which the expression has a non-
NA value. For example, assume that an expression is dimensioned by
month, and that
Jan97 is the first dimension value for which the expression has a non-
NA value. In this case, BEGINDATE returns the date
January 1, 1997.
Note:You cannot use this function for time dimensions that are implemented as hierarchical dimensions of type TEXT.
DATE-only or text
When all the values of the expression are
NA, BEGINDATE returns
The expression must have exactly one dimension that has a type of DAY, WEEK, MONTH, QUARTER, or YEAR.
The following statements limit the values in the
district dimensions, then send the first date for which the
units variable contains a non-
NA value for unit sales of tents in the Chicago district to the current outfile.
LIMIT month TO ALL LIMIT product TO 'TENTS' LIMIT district TO 'CHICAGO' SHOW BEGINDATE(units)
These statements produce the following output.