Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The MERGE directive merges two columns by inserting a third column into a record. The values in the third column are merged values from the two columns delimited by a specified separator.

Syntax

Code Block
 merge <first>:column1 <second>:column2 <new:destination column> '<seperator>seperator'
  • The <first> and <second> column values column1 and column2 values are merged using a separator. The columns to be merged must both exist and should be of type string for the merge to be successful.

  • The <new-column>destination is the new column that will be added to the record. If the column already exists, the contents will be replaced.

  • The <separator>separator is the character or string to be used to separate the values in the new column. It is specified between single quotes. For example, a space character: ' '.

  • The existing columns are not dropped by this directive.

...

Applying these directives:

Code Block
merge :first :last "fullname ' '
merge :first :last :fullname '''
merge :first :last :fullname '\u000A'
merge :first :last :fullname '---'

would result results in these records:

Separator is a single space character (' '):

...