Skip Headers
Oracle® OLAP DML Reference
10g Release 2 (10.2)

Part Number B14346-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

STATFIRST

 The STATFIRST function returns the first value in the current status list of a dimension or a dimension surrogate, or in a valueset.

Return Value

The data type returned by STATFIRST is either the data type of the dimension or dimension surrogate value or an INTEGER that indicates its position in the default status list of the dimension.The dimension value returned by STATFIRST is converted to a number or a text value, as appropriate to the context. See Example 22-27, "Assigning value of STATFIRST to Variables of Different Types".

Syntax

STATFIRST(dimension)

Arguments

dimension

A text expression whose value is the name of a dimension, a dimension surrogate, or a valueset.

Examples

Example 22-27 Assigning value of STATFIRST to Variables of Different Types

The following statements

DEFINE textvar TEXT
textvar = STATFIRST(month)
SHOW textvar

produce this output.

Jun95

In contrast, these statements

DEFINE intvar INTEGER
intvar = STATFIRST(month)
SHOW INTVAR

produce this output.

6

Example 22-28 STATFIRST with KEEP

The following line from a program uses STATFIRST to limit month to all values in the status up to a value that has been stored previously in a variable called onemonth. The keyword KEEP means the new status is always a subset of the old status.

LIMIT month KEEP STATFIRST(month) TO onemonth

STATFIRST is used here, rather than a particular month value, so that the limit can work on any status list.