Skip Headers
Oracle® OLAP DML Reference
11g Release 2 (11.2)

Part Number E17122-05
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF


The EVERY function returns YES when every value of a Boolean expression is TRUE, or NO when any value of the expression is FALSE.

Return Value



EVERY(boolean-expression [CACHE] [dimension...])



The Boolean expression whose values are to be evaluated.


Specifies slightly different internal behavior. Specify this keyword only when the original performance is extremely slow.


The name of a dimension of the result; or, the name of a relation between one dimension of boolean-expression and another dimension that you want as a dimension of the result.

By default, EVERY returns a single YES or NO value. When you indicate one or more dimensions for the result, EVERY tests for TRUE values along the dimensions that are specified and returns an array of values. Each dimension must be either a dimension of boolean-expression or related to one of its dimensions.


When you specify a dimension that is not an actual dimension of boolean-expression, but, instead, is dimension that is related to a dimension of boolean-expression and when there are multiple relations between the two dimensions, Oracle OLAP uses the default relation between the dimensions to perform the calculation. (See the RELATION command for more information on default relations.) When you do not want Oracle OLAP to use this default relation, specify the related dimension by specifying the name of a specify relation.

Usage Notes

The Effect of NASKIP on EVERY

EVERY is affected by the NASKIP option. When NASKIP is set to YES (the default), EVERY ignores NA values and returns YES when every value of the expression that is not NA is TRUE and returns NO when any values are not TRUE. When NASKIP is set to NO, EVERY returns NA when any value of the expression is NA. When all the values of the expression are NA, EVERY returns NA for either setting of NASKIP.


Example 7-77 Testing for All-True Values by District

You can use the EVERY function to test whether each district's sales of sportswear have exceeded $50,000 in every month. To have the results dimensioned by district, specify district as the second argument to EVERY.

LIMIT product TO 'Sportswear'
REPORT HEADING 'Top Sales' EVERY(sales GT 50000, district)

The preceding statements produce the following output.

DISTRICT       Top Sales
-------------- ----------
Boston                 No
Atlanta               Yes
Chicago               Yes
Dallas                Yes
Denver                Yes
Seattle                NO

Example 7-78 Testing for All-True Values by Region

You might also want to find out the regions for which every district has sportswear sales that exceed $50,000 in every month. Since the region dimension is related to the district dimension, you can specify region instead of district as a dimension for the results of EVERY.

REPORT HEADING 'Top Sales' EVERY(sales GT 50000, region)

The preceding statement produces the following output.

REGION         Top Sales
-------------- ----------
East                   No
Central               Yes
West                   NO