CREATE TEXT CONCATENATE command
See Crunch Automation basics for more information.
The CREATE TEXT CONCATENATE command allows you to create a new text variable by concatenating multiple inputs by alias and use an optional separator.
The input variables can be categorical or text variables. For categorical inputs, the category's name is used.
CREATE TEXT CONCATENATE
alias, alias, alias
[SEPARATOR "string"]
AS alias
[TITLE "string"]
[DESCRIPTION "string"]
[NOTES "string"];
Example
CREATE TEXT CONCATENATE first_name, last_name
SEPARATOR " "
AS full_name;
CREATE TEXT CONCATENATE last_name, first_name
SEPARATOR ", "
AS full_name_by_lastname;
CREATE TEXT CONCATENATE age_range, country
SEPARATOR "_"
AS prefixed_by_age; # Separated via underscore
CREATE TEXT CONCATENATE age_range, country
AS prefixed_by_age;