Define conditions

To modify the conditions for an SQL statement, first switch to the Data perspective, and then open your SQL statement in the SQL Builder.

Conditions for an SQL statement are specified in a WHERE clause or a HAVING clause.

To enter a value in one of the table cells, click the appropriate row in the Conditions table, then the appropriate cell, and select a value from the list. You can type a value (typically numeric or string constants, or host variables) directly into a cell, or build an expression in the Expression Builder wizard.

The following list describes the columns in the Conditions table:

Column

This column can contain either a table column or an expression. To enter an expression, click Build Expression in the list, and then use the pages of the Expression Builder wizard to specify the expression.

Operator

Select an operator for the condition.

Value

This column can contain a column, value, or expression. Double-click the cell to type a value, select a column, or click Build Expression to start the Expression Builder wizard.

And/Or

If you need multiple predicates in your WHERE clause, specify either the AND or the OR operator between each predicate.

After you have completed a cell, for the change to take effect, click outside of the cell or press Enter.

You can remove a condition by right-clicking it and then clicking Remove Condition on the pop-up menu.

Note: The use of parentheses in conditions is not currently supported.

 

Parent topic

Editing an SQL statement