
Contributor
2023-03-30
10:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Merge two rows with one column with different values into 1 row with both values
Hi,
I have the following issue. I have a set of data with multiple rows and different columns. I made a simple example that should solve my problem.
This is the example data that i have. If the values of ID is the same then i want to have a combined field in location separated by a value. How can i solve this in my script?
ID | Location |
1 | New york |
1 | Amsterdam |
2 | Tokyo |
3 | Barcelona |
This is the table that i want to have
ID | Location |
1 | New york, Amsterdam |
2 | Tokyo |
3 | Barcelona |
Thanks in advance for your help!
2,192 Views
1 Solution
Accepted Solutions


MVP
2023-03-30
10:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a use case for Concat(), seemingly:
Load ID, Concat(Location, ',')
From YourTable
Group By ID;
2 Replies


MVP
2023-03-30
10:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a use case for Concat(), seemingly:
Load ID, Concat(Location, ',')
From YourTable
Group By ID;

Contributor
2023-04-11
03:27 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for this. It worked!
2,113 Views
