Access this window from the Where tab of the Gui Query Builder.
This window is used to specify the criteria for a query by building a WHERE statement. The Where statement sets the criteria that specify the rows to be returned by the query.
A Where statement consists of one or more Where clauses.
For instance, the following Where statement:
(name='fred' and state='CA') or (salary<10000 and name is null)
consists of 4 Where Clauses. These clauses are connected by ANDs and ORs; and indented within various levels of brackets.
The top pane of the Where window has a grid displaying your Where clauses, and how they are connected
The bottom pane is a text box which shows you the entire Where statement.
You build your Where statement in two steps:
These two steps are described below.
You do this by clicking on either
NEW and MOD will take you into the Where Clause window that makes it easy to build a Where Clause.
DEL deletes a Where Clause.
Connect your Where clauses using the grid in the Where window. First, you must build some Where clauses, which will be displayed in the grid.
As you build the Where statement, it is shown in the text box. If you have a very large or complex Where statement you might find it very useful to check Show Clauses as Numbers. This shows clause numbers in place of clause text.
For instance (name='fred' and state='CA') or (salary<10000 and name is null)
will be shown as (1 and 2) or (3 and 4)
. This can make it easier to understand complex Where statements.
When you have specified a Summary query, (by setting the Query Type in Options > Columns) an extra box in the Where window will allow you to specify both Where clauses and Having Clauses. The Show What option allows you to specify which of these statements to display in the text box.