Oracle9i OLAP Services Developer's Guide to the OLAP DML
Release 1 (9.0.1)

Part Number A86720-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Limiting an Application's View of the Data, 3 of 11


Limiting Using a Simple List of Values

Overview: Limiting to a simple list of values

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:

Example: Limiting to literal values

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

Limiting using time values

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 value for a . . .  THEN you must specify the . . . 

DAY or WEEK dimension, 

day, month, and year. 

MONTH or QUARTER dimension, 

month and year (for example, JUN95 or 0695 for June 1995). 

YEAR dimension, 

year (for example, 95 for 1995). 

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.

Related information

For more information, see the following table.

IF you want documentation about . . .  THEN see . . . 

limiting dimensions, 

the rest of this chapter

the entry for the LIMIT command in OLAP DML Reference 

the valid input styles for dates, 

the entry for the DATEORDER option in OLAP DML Reference 

VNF (value name format), 

the entry for the VNF command in OLAP DML Reference 


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback