Oracle® Database SQL Reference 10g Release 1 (10.1) Part Number B10759-01 |
|
|
View PDF |
The IS
ANY
condition is relevant only for interrow calculations, and can be used only in the model_clause
of a SELECT
statement. Use this condition to qualify all values of a dimension column, including NULL
.
The condition always returns a boolean value of TRUE
in order to qualify all values of the column.
See Also: model_clause for more information on interrow calculations and "Model Expressions" for information on model expressions |
The following example sets sales for each product for year 2000 to 0:
SELECT country, prod, year, s FROM sales_view MODEL PARTITION BY (country) DIMENSION BY (prod, year) MEASURES (sale s) IGNORE NAV UNIQUE DIMENSION RULES UPSERT SEQUENTIAL ORDER ( s[ANY, 2000] = 0 ) ORDER BY country, prod, year; COUNTRY PROD YEAR S ---------- ----------------------------------- -------- --------- France Mouse Pad 1998 2509.42 France Mouse Pad 1999 3678.69 France Mouse Pad 2000 0 France Mouse Pad 2001 3269.09 France Standard Mouse 1998 2390.83 France Standard Mouse 1999 2280.45 France Standard Mouse 2000 0 France Standard Mouse 2001 2164.54 Germany Mouse Pad 1998 5827.87 Germany Mouse Pad 1999 8346.44 Germany Mouse Pad 2000 0 Germany Mouse Pad 2001 9535.08 Germany Standard Mouse 1998 7116.11 Germany Standard Mouse 1999 6263.14 Germany Standard Mouse 2000 0 Germany Standard Mouse 2001 6456.13 16 rows selected.
The preceding example requires the view sales_view
. Please refer to "Interrow Calculations: Examples" to create this view.