A value expression that combines two other value expressions
by joining the second to the end of the first. Concatenated
expressions uses the concatenate operator (|). You can combine
value expressions of any kind, including numeric expressions,
string expressions, and literals.
You can use concatenated expressions to simulate group fields and
edit strings.
Format
(B)0[mconcat-expr =
qqq> value-expr qqq> | qqq> value-expr qqq>
1 – Examples
Example 1
Use a concatenated expression as a field in a view:
DEFINE VIEW MAIL OF
E IN EMPLOYEES.
NAME COMPUTED BY
E.FIRST_NAME | ' ' | E.MIDDLE_INITIAL | ' ' | E.LAST_NAME.
E.ADDRESS_DATA_1.
E.CITY.
E.POSTAL_CODE.
END MAIL VIEW.
This statement creates a field for the view by combining the
three name fields from the EMPLOYEES relation.
Example 2
Use a concatenated expression to simulate an edit string:
DEFINE VIEW BUCKS OF S IN SALARY_HISTORY.
EMPLOYEE_ID.
SALARY_START.
SALARY_END.
SAL COMPUTED BY "$"|S.SALARY_AMOUNT.
END.
When you display the fields of BUCKS, a dollar sign appears in
front of the salary amount.