Use the Expression Editor to create an expression that consists of fields, functions, and parameters. You can use the Expression Editor wherever you can use an expression instead of a field name. When you create an expression, you can view the definitions of PowerCenter functions. You can also view the properties of the fields in the table that you are testing.
In the dialog box in which you are creating a test, select the
Field is Expression
option.
Click the
Expression Editor
button.
The
Expression Editor
dialog box appears.
To add a function to the expression, click the
Functions
tab, and then perform the following tasks:
Expand
All Functions
or expand a function category.
To view the description of a function, click the function.
The description of the function appears on the
Functions
tab. Use the information in the function description to determine what fields you can use in the function.
To add a function at a particular location in the expression text box, place the insertion point at the location.
On the
Functions
tab, double-click the function.
To add a field to the expression, click the
Fields
tab, and then perform the following tasks:
To view the properties of a field, click the field.
The properties of the field appear on the
Fields
tab.
To add a field at a particular location in the expression text box, place the insertion point at the location.
To pass a field to a function, place the insertion point within the parentheses that follow the function name, and then add the field.
On the
Functions
tab, double-click the field.
To add an operator, perform the following tasks:
In the expression text box, place the insertion point where you want to add the operator.
In the
Operator Keypad
, click the operator.
To add a number, perform the following tasks:
In the expression text box, place the insertion point where you want to add the number.
In the
Numeric Keypad
, click the number.
In
Type
, select the PowerCenter data type that you want to apply to the result.
The PowerCenter data type must be compatible with the data types of the expression components.
In
Precision
, enter the precision for the PowerCenter data type that you selected for the expression.
In
Scale
, enter the scale for the PowerCenter data type that you selected for the expression.