Where Clause Wizard

The Where Clause Wizard contains pages that step you through the process of building a Where clause.

*  To create a Where clause using the Where Clause Wizard:

  1. Choose an option to place on the left side of the Where clause equation.

    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

    Test for existence/non-existence via a subquery (seeCreating Subqueries to Test for Existence/Non-Existence)

  2. Choose an operator or SQL predicate to join the two sides. Available options include:

    • Equal to, Not equal to, Less than, Greater than, Less than or equal to, Greater than or equal to—Use the comparison operators to compare a single date or numeric value. If you choose a comparison operator, you can modify it with the ANY or ALL modifiers. Comparison modifiers are mutually exclusive – you can select ANY, ALL but not both. If you choose ANY or ALL, the right side of the Where clause has to be a subquery, and the appropriate dialog boxes will appear. Comparison Operators

    • IN, NOT IN, BETWEEN, NOT BETWEEN—Use this options to create a list. List Operators

    • LIKE, NOT LIKE—Use these options to evaluate a text column or an expression. String Operators

    • IS NULL, IS NOT NULL—If you choose one of the options, the Where clause does not have a right side. Unknown Operators

  3. Choose an option to place on the right side of the Where clause equation. Depending on the operator or SQL predicate selected, you can evaluate the value selected:

    • Against a database column or expression

    • Against a constant or a one-off expression

    • Against a value prompted at runtime

    • Against one or more values from a subquery

      Note:

      In addition to creating Where clauses, you can use the Where Clause Wizard to create Having clauses.

Related Topics

Where Clauses

Adding Conditions to the Data (Creating Where Clauses)

Where Clause Builder