Query Combining Operators

With combining operators, you can combine two separate sets of filtering criteria to narrow your query even further. Combining operators are characters that provide a link between selected criteria and define the records included in the query.

Operator

Description

and

To indicate that records must meet both criteria to be selected, select the second of the criteria and click and. For example, if you use the field criteria City “equals” Cambridge AND Country “equals” United Kingdom, the query excludes records with addresses in Cambridge, Massachusetts, in the United States. The records selected must meet both criteria to appear in the results. The default combining operator used in a query is and.

or

To indicate records can meet either criteria to be selected, select the second of the criteria and click or. For example, if you use the field criteria County “equals” Norfolk OR Suffolk, the query includes all records with addresses in either Norfolk and Suffolk.

Parenthesis ()

Use parentheses to make two pieces of a criteria a whole. For example, if you use State “equals” Texas AND (City “equals” Dallas OR City “equals” Fort Worth), the records selected must first have Texas as a value in the Statefield, and must also have either Dallas or Fort Worth in the City field. In this case, records must meet the first criteria and at least one of the criteria within the parentheses.

 

 

You are here: Overview > Need Help with Analysis? > Information Library > Ad-Hoc Queries > Create Ad-Hoc Queries > Query Criteria Operators > Query Combining Operators