I am trying to create a column titled "skills" which lists each skill a given person is associated with. Essentially, I am currently receiving the following results:
NAME            SKILL
Person A        Programming
Person A        Web Design
Person A        SQL
Person B        Project Management
Person B        Written Communication
And I need to get results like this:
NAME            SKILL
Person A        Programming, Web Design, SQL
Person B        Project Management, Written Communication
This is what my SQL code currently looks like:
CAST((
    SELECT InterestCodeRoot.Code + ','
    FROM InterestCodeRoot
    WHERE EmployeeInterestCode.CodeIdent = InterestCodeRoot.CodeIdent
    FOR XML PATH(''))as varchar(max))
    AS [Skill ID],
I have also tried using STUFF() and GROUP_CONCAT() but neither alternative has worked. This is the closest I have gotten. Any advice or assistance would be appreciated.
 
    