Adding a Conditional Statement
To add a conditional statement:
- Open Query Builder.
- In the Query Builder window, click the Conditions tab.
- Select a table from the upper left side of the Query Builder. If necessary, click the plus sign to expand the list of tables.
-
Select a field from the upper right side of the Query Builder.
This field displays all fields that belong to the selected table. Double-click
the field to add it to the grid at the bottom of the dialog box.
The Assign Condition dialog box opens automatically. You can open this dialog box at any time by double-clicking a statement in the grid.
- Select an Operator.
-
In the Value
is field, do one of the following:
- Specify a value or click Browse to select a
value.
If you selected "In" as an operator, the values must have quotation marks around each entry.
- If you selected a date/time field, string, or integer field type and want to use a custom parameter, select Use Value as a Literal, click in the Value is box, and then click the drop-down arrow to select a condition parameter if one is available.
Note: If you selected a parameter with an "x" placeholder value, the Provide Template Value dialog box opens. In the box, type the numeric value to replace the placeholder. - Specify a value or click Browse to select a
value.
-
Select
Case Sensitive Compare if
you want the capitalization of the value used as part of the condition. By
default this option is selected.
If you are using MS SQL Server, the Case Sensitive Compare option is not applicable. All queries are case insensitive.
- If necessary, select Use Value as a Literal.
- Click OK.
- To add another condition statement, repeat steps 1–9, and then select the appropriate connector.