Use this page to build a searched CASE expression
by adding WHEN
and ELSE clauses to the expression.
The
WHEN clauses contain Boolean search conditions that are evaluated.
For example, CREDIT_LIMIT > 3000.
- Build WHEN-THEN clauses, add an ELSE clause, or both
- Use the rows in this grid to create the WHEN clauses
and the optional ELSE clause of the CASE expression. To add a
WHEN clause,
click Add WHEN Clause. To remove a WHEN clause,
right-click
the clause and then click Remove WHEN Clause on
the
pop-up menu.
- CASE
- Shows
whether the row contains a WHEN clause or
an ELSE clause. If the row is an additional operand for the search
condition,
an ellipsis is shown in this cell.
- Expression
- Use this cell, together with the Operator cell
and the second Expression cell, to specify
the search
condition. Type a value, select a column from the list, or click Build
Expression to use the Expression Builder wizard to create
the
expression.
- Operator
- Select the operator that you want to use in the
search condition.
- Expression
- Use this cell, together with the first Expression cell
and the Operator cell, to specify the search
condition. Type
a value, select a column from the list, or click Build
Expression to
use the Expression Builder wizard to create the expression.
- AND/OR
- If the
WHEN clause that you are defining contains
a compound search condition, select the logical connective between
the operands. A
new row is added for you to specify the next operand in the search
condition.
- THEN
- Specify the value that should be returned if the
WHEN search condition evaluates to true. Click Build
Expression to
use the Expression Builder wizard to create the THEN expression.
- Add ELSE clause
- Select this check box to add an ELSE clause to
the grid. The ELSE clause is used if none of the WHEN clauses evaluates
to
true. In the Expression cell of the ELSE
clause,
specify a value expression. Select a column, type a value or an expression,
or click Build Expression to create a more
complex
expression. To remove the ELSE clause, clear this check box.
- Preview of CASE expression
- Shows the searched CASE expression that you have
created.