Lets say I have a table of employees, like this:
Name Sex Role
Bob M Developer
Joe M QA
Now, I have a problem with this table of duplicated rows. I will fix it sometime but it's not the issue. What I currently need is something that queries such a table:
Name Sex Role
Bob M Developer
Bob M Janitor
Joe M QA
Joe M CEO
And will output the following rows:
Name Role
Bob Developer, Janitor
Joe QA, CEO
It doesn't matter to me if the "Role" will be split to separate columns or be a single column with multiple values.
Using SQL Server 2008 if it matters.