Where Clauses

Use the Where Clauses dialog box to enter conditions to your query and customize the rows of data retrieved. (In SQL, a condition is called a Where clause.)

As you customize the data to retrieve, you may want a column to match a specific value, or you may want a column to be greater than a specific value. For example, if you had a column named ZIPCODE, you could specify ZIPCODE < 40000 to select all zip codes under 40000.

FieldDescription

Add Clause

Accesses a Where Clause Wizard that walks you through the process of defining a Where clause. (You may wish to use this option to build a Where clause that uses subqueries, or to build a Where clause that prompts a user for values to enter at runtime.)

Add Custom

Accesses the Where Clause Builder, where you can add a custom Where clause. (You may wish to use this option to build an advanced Where clause using SQL.)

Remove

Removes the selected Where clause.

Edit

Allows you to edit an existing Where clause.

Copy

Copies the selected Where clause. You can then edit the new Where clause as desired.

Move Up/Move Down

If you have more than one Where clause, use the Move Up/Move Down buttons to change the order in which the Where clauses appear. In general, you should put your most restrictive Where clauses first.

Logical Operator

You can combine several Where Clauses with the logical operators AND or OR. If you combine Where clauses that evaluate values prompted at runtime, you can also use the logical operator ELSE. Click next to the logical operator you wish to use.Operator Examples

Related Topics

Where Clause Wizard

Where Clause Builder

Adding Conditions to the Data (Creating Where Clauses)

Joining Where Clauses

Creating Where Clauses to Evaluate Database Columns or Expressions

Creating Where Clauses to Evaluate Constant or One-off Expressions

Creating Where Clauses to Evaluate Values Prompted at Runtime