I am encountering a problem with joining a table in SQL Server. I get more rows than I need in my view.
The table I join looks something like this:
| ID | other ID | Name |
|---|---|---|
| 1 | 1 | Bob |
| 2 | 1 | Max |
| 3 | 2 | Jim |
| 4 | 2 | Tom |
| 5 | 2 | Ron |
The new table should look like this:
| other ID | Names |
|---|---|
| 1 | Bob,Max |
| 2 | Jim,Tom,Ron |
In that way I don’t get a new row every time a new Name comes up, but it's the same "other" ID.
Can someone please help me solve this problem? Thank you.