STRING

Function

Concatenates a list of variables, columns, or literals into a single text variable. Each member of the list is separated by the specified delimiter string.

Syntax

STRING {src_any_lit|_var|_col}...BY {delim_txt_lit|_var|_col}
INTO dst_txt_var

Arguments

src_any_lit|_var|_col

One or more fields to concatenate, separated by the delim_txt_lit|_var|_col character or characters, and placed into the dst_txt_var variable.

If the source is a date variable or column, it is converted to a string according to the following rules:

delim_txt_lit|_var|_col

Characters used as separators between source fields.

dst_txt_var

The destination field for the concatenated result.

Description

Do no include the destination string in the list of source strings.

Examples

string  &name  &city  &state  &zip  by  ' - '  into  $show-info
     ! Result:  Sam Mann - New York - NY - 11287
string  &cust_num  &entry-date  &total  by  ','  into  $cust-data
     ! Result:  100014,12-MAR-89,127
     ! Use null delimiter.
string  &code1  &code2  &code3  by  ''  into  $codes123
     ! Result:  AGL

See Also