Add search conditions to an SQL statement (WHERE or HAVING clause)

You must select tables for a SELECT, UPDATE, or DELETE statement before you can add a search condition in the WHERE clause.

For a SELECT statement, you should select grouping columns before you add a search condition in the HAVING clause.

A search condition specifies a condition that is true, false, or unknown about a given row. The result of a search condition is derived by application of the specified logical operators (AND, OR, NOT) to the result of each specified predicate. If logical operators are not specified, the result of the search condition is the result of the specified individual predicate.

To add search conditions to an SQL statement (WHERE or HAVING clause):

In the Details area for the WHERE (Row filter) node in a SELECT, UPDATE, or DELETE statement, or the HAVING (Group filter) node in a SELECT statement, complete the following steps.

  1. In the Column list, select a column name.
  2. Select an operator from the Operator list. The available options in the Details area change based on what operator you choose. You can:
  3. Click > to move the completed predicate to the Search Condition area. The predicate is also added to the SQL statement in the SQL code view. The > button will only add a predicate to the Search condition area when the Search condition area is empty. If the Search condition area contains existing predicates, clicking the > button will overwrite any selected predicate in the Search condition area.
  4. Insert additional predicates with AND or OR logical operators by clicking the AND > or OR > button. The predicate will be inserted below the selected item in the Search condition area. The predicate is also added to the SQL statement in the SQL code view.

To modify a predicate in the Search condition area:

  1. Select the predicate in the Search condition area. The Predicate area changes to reflect the content of the selected predicate.
  2. Adjust the Column, Operator, or Value settings in the Predicate area.
  3. Click the > button to replace the selected predicate in the Search condition area with the new values in the Predicate area.
  4. Optional: Add parentheses, remove predicates, or remove groups of predicates with the the fields and controls below the Search condition area. Changes are added to the SQL statement in the SQL code view.
Note: If a single predicate is selected, the NOT logical operator checkbox is displayed below the Search condition area. This checkbox is kept in sync with the NOT logical operator checkbox above the Predicate area.

Go to: