Hi -I am trying to pivot my data results so that instead of showing multiple rows for each product a client has it will show one line for each client and concatenate all of their products together. For example, if I run the following query:[code="sql"]SELECT [Year], [Client_Name], [Product_Name]FROM My.dbo.TableGROUP BY [Year], [Client_Name], [Product_Name][/code]I get the following result set:Year Client_Name Product_Name2014 Bob Hosting2014 Bob Development2014 Bob Testing2014 Fred Development2014 Fred Consulting2014 Max Consulting2015 Bob Hosting2015 Bob TestingWhat I want to get back as the result set is the following:Year Client Name Product-List2014 Bob Hosting-Development-Testing2014 Fred Development-Consulting2014 Max Consulting2015 Bob Hosting-TestingSo, I would only get one record back for each Client for each Year with a list of all of their products concatenated together.Thanks in advance for any guidance!
↧