A search condition specifies a condition that is true,
false, or
unknown about a given row or group. 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.
You specify conditions
for an SQL statement in a WHERE clause or
a HAVING clause. Use the WHERE clause in SELECT, UPDATE, and DELETE
statements
to specify conditions for rows. You can define WHERE clauses in the
SQL Query Builder
on the Conditions page of the Design pane. Use the HAVING clause in
a SELECT
statement to specify conditions for groupings. You can define HAVING
clauses
in the SQL Query Builder on the Group Conditions page of the Design
pane.
Restriction: The use of parentheses in conditions
is not supported.
Prerequisite: The
SQL statement must be open in the SQL Query Builder.
To define a condition for an SQL statement in the SQL
Query Builder:
- In the Design pane of
the SQL Query Builder, click the tab for the type
of condition that you are defining:
- If you are
defining the condition for a row, click the Conditions tab.
- If you are defining the condition for a grouping, click the Group
Conditions tab.
- Double-click
the first empty cell under the Column heading
and select a column or type the expression for the condition. You
can also click Build Expression in the list
and use
the Expression Builder wizard to create a complex expression.
- Double-click the adjoining cell under the Operator heading
and select an operator for the condition.
- Double-click
the adjoining cell under the Value heading
and select a column or type a value or expression. A value
is typically
a numeric or string constant or a host variable. You can also select Build
Expression in the list and use the Expression Builder
wizard to
create a complex expression.