Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-03 |
|
|
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 or text (see "Automatic Conversion of DATE Values to Text Values")
When all the values of the expression are NA
, BEGINDATE returns NA
.
BEGINDATE(expression)
The expression must have exactly one dimension that has a type of DAY, WEEK, MONTH, QUARTER, or YEAR.
Example 10-30 Finding the Beginning Date
The following statements limit the values in the month
, product
, and 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.
01JAN95