Case Tab
You can use the Case tab to build a CASE expression to be used in an SQL expression. This expression can be located in a WHERE clause, a HAVING clause, or the JOIN expression of a SELECT statement. The Case tab contains the following elements:
Operand - Specifies the field that is used as the optional operand for the CASE expression. If you enter the field name for the operand in this field, you do not need to enter it in the WHEN Condition fields for each of the conditions. For example, you can enter UNITEDSTATES.Region into Operand and not enter that field name when you create WHEN conditions for each of the regions in the country. You can simply enter South instead of UNITEDSTATES.Region = 'South'. Note, however, that this shortcut works only when the conditions in the CASE expression are all equality tests. That is, none of the conditions can use comparison operators or other types of operators. You can click Field to browse for an operand.
The Expressions section of the tab contains a toolbar that enables you to perform the following functions:
- Adding, editing,and deleting expressions
- Inserting values into an existing row
- Moving expressions up and down
The expressions table contains the following elements:
WHEN Condition - Specifies the WHEN condition that is evaluated in the CASE expression.
THEN Result - Specifies the THEN result that is returned when a WHEN condition is satisfied.
ELSE Result - Specifies a result for rows in the table that satisfy none of WHEN conditions. You can click Expression to create an expression.