Oracle9i OLAP Services Developer's Guide to the OLAP DML Release 1 (9.0.1) Part Number A86720-01 |
|
Limiting an Application's View of the Data, 3 of 11
A common way of selecting data is to limit a dimension to a value or list of values. The simplified syntax for using the LIMIT command in this way is shown below.
LIMIT dimension TO values
The values argument can consist of any combination of:
Suppose that you want a report of footwear sales in Boston for January through March 1995. The following commands limit the appropriate dimensions and request the report.
limit month to 'JAN95' 'FEB95' 'MAR95' limit product to 'FOOTWEAR' limit district to 'BOSTON' report sales
The report output looks like this.
DISTRICT: BOSTON -------------SALES-------------- -------------MONTH-------------- PRODUCT JAN95 FEB95 MAR95 -------------- ---------- ---------- ---------- FOOTWEAR 91,406.82 86,827.32 100,199.46
You can use the LIMIT command to limit dimension status for the value of a time dimension. When you specify a value of a time dimension (that is, a dimension with a data type of DAY, WEEK, MONTH, QUARTER, or YEAR), the value can be in:
When you specify a time dimension value as a date, you only need to provide the date components that are relevant for the type of dimension you are limiting.
If you specify a DATE expression or a text value that represents a complete date, then you can specify any date that falls within the time period that is represented by the desired dimension value. The DATEORDER option is used automatically to resolve any ambiguities.
For more information, see the following table.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|