Concatenating fields

If your analysis requires testing or processing two or more fields in a table as a single data element, you can create a computed field that concatenates (adds together) the fields. You can then test or process the combined data in the computed field. For example, you could concatenate first, middle, and last name fields into a single field containing full names, or concatenate vendor ID and location code fields to produce unique identifiers for each outlet of every retail chain in a table.


You can concatenate only character fields. If necessary, use ACL functions to convert non-character data prior to concatenating.

To concatenate fields:

  1. Open a table and select Edit > Table Layout.
  2. Click Add a New Expression .
  3. Enter a Name for the concatenated field.
  4. Click f(x) to open the Expression Builder.
  5. Build an expression using two or more fields and the Add operator (+).

    If required, you can include separator characters, such as blanks, in the expression, and use the TRIM( ) function to remove trailing blanks from fields. For example:

    TRIM(first_name) + " " + TRIM(middle_name) + " " + last_name

  6. Click OK.

    If you get an “Expression type mismatch” error, one or more of the fields are probably not character fields.

  7. Click Accept Entry and click Close to exit the Table Layout dialog box.

    For information about how to add the computed field to the view, see Adding columns to a view.

(C) 2015 ACL Services Ltd. All Rights Reserved.