I have three tables. I have connected it using a query, but I would like to separate results with comma in one line instead of showing result on different line.
1st table
ProgrammeId | Name
====================
1 |Software Engineering
2 | Game Design
2nd table
CoordinatorId| CoordinatorName
====================
1 |Bob
2 | Ted
3d table
ProgrammeId| CoordinatorId
====================
1 | 1
1 | 2
2 | 1
That is a query.
SELECT a.ProgrammeId, a.Name, c.NameCoordinator
FROM Programme a
--Joining maptable for Programme and Coordinator
INNER JOIN ProgrammeCoordinators b
ON a.ProgrammeId = b.ProgrammeId
INNER JOIN Coordinator c
ON b.CoordinatorId = c.CoordinatorId
Output will be something like that:
ProgrammeId| Name | CoordinatorName
==================================
1 | Software Engineer | Bob
1 | Software Engineer | Ted
2 | Game Design | Ted
How can I separate to show this:
1 | Software Engineer | Bob, Ted