Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-01 |
|
|
View PDF |
The STATLIST function returns a list of all values in the current status list of a dimension or dimension surrogate, or in a valueset. You can format the list to a specified width. The STATLIST function is employed by the STATUS command, which summarizes the status of a dimension. Use STATLIST rather than STATUS when you want to control the width or placement of the display.
Return Value
STATLIST returns a list of TEXT values that contains either the dimension or dimension surrogate values themselves (for example, Jan95
) or numbers (for example, 6
) that represent the positions of the values in the default status list.
The returned values are in the form value TO value, for example, Jan9
6 TO
Jun96
. When default status is in effect, it displays ALL
. When the current status list or the valueset is empty, it displays NULL
.
Syntax
STATLIST(dimension [keyword] [width])
Arguments
A text expression whose value is the name of a dimension, a dimension surrogate, or a valueset.
A keyword from Table 22-3, "Keywords for STATLIST". The keywords allow you to specify the form in which you want the values in the current status list to appear.
Table 22-3 Keywords for STATLIST
Keyword | Description |
---|---|
INTEGER |
Specifies that STATLIST should return the list of values in the current status of a dimension in the form of the |
TEXT |
(Default) Specifies that STATLIST should return the list of values in the current status of a dimension in the form of the value names of those values. |
An optional INTEGER
expression that specifies the width of the list in characters. When no width is specified, STATLIST uses the current value of the LSIZE option. LSIZE has a default value of 80
.
Examples
Example 22-31 Producing a Status List with ROW
This example lists months in which total sales exceed $3,000,000.
These statements
LIMIT month TO TOTAL(sales, month) GE 3000000 ROW W 40 'Months with total sales over $3,000,000: '- W 40 STATLIST(month, 40)
produce the following output.
Months with total sales over $3,000,000: Jun95 TO Sep95, May96 TO Sep96
Example 22-32 Producing a Status List with SHOW
The following STATLIST statement formats dimension values to a 20-character width.
LIMIT month TO 'Jan95' 'Mar95' 'May95' 'Jul96' 'Sep96' 'Nov96' SHOW STATLIST(month 20)
These statements produce this output.
Jan95, Mar95, May95, Jul96, Sep96, Nov96
This statement lists dimension positions.
SHOW STATLIST(month INTEGER 20)
This is the output.
1, 3, 5, 19, 21, 23