Merging rows in a data table


What would be the most logical way to approach this? (step by step)

I have 10 rows, and if three first rows are identical, then I would like to merge the rows together in a way that if data in any row is the same, then it should be left out but if it is different, then it should be connected by “,”. So for example:

I have two rows in my data table going:

Mark Jason Florida Builder 26 …
Mark Jason Florida Singer 26 …

The expected result would be one row:

Mark Jason Florida [Singer, Builder] 26 …

There is one thing that is important: it needs to happen under the condition that three first columns are matching.

Any ideas?

  1. Iterate through the Data Table (Use for each row activity) and identify rows with matching values in the first three columns.
  2. Use a combination of data manipulation activities to merge the rows with the same values in the first three columns.
  3. Compare the data in each row for the remaining columns and handle the merging of differing data as required, using the appropriate string manipulation functions to concatenate or exclude duplicate values.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.