Use this page to build a simple CASE expression by adding WHEN
and ELSE clauses to it.
The WHEN clauses can contain value expressions that will be compared
with the value expression immediately after the CASE keyword.
- CASE
- From the drop-down list, select the column or
type the expression to evaluate against the WHEN clause expressions. To
specify a more complex expression, select the type of expression in the list,
and then use the wizard pages to build the expression.
- unlabeled grid
- Use the rows in this grid to define the WHEN clauses
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.
- Expression
- Specify the value expression for the WHEN operand. You
can type a value, select a column, or click Edit Expression to
build a string constant.
- Result Expression
- Specify the value expression for the result. You
can type a value, select a column, or click Edit Expression to
build a string constant.
- 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 simple CASE expression that you have
created.