T-SQL convert rows to comma-separated string, with a GROUP BY

T-SQL convert rows to comma-separated string, with a GROUP BY
Burhan DinAsked:
Who is Participating?
 
Éric MoreauSenior .Net ConsultantCommented:
the string_agg feature is only available in the newer version of MS SQL Server (like SQL 2017, SQL Azure, ...).

If you are still using an older version, have a look at http://emoreau.com/Entries/Blogs/2009/10/SQL-Concatenate-values-multiple-from-multiple-lines.aspx
0
 
johnsoneSenior Oracle DBACommented:
Try the STRING_AGG function.  There is an example in the documentation that is a sample of exactly what you describe.
0
 
Éric MoreauSenior .Net ConsultantCommented:
Burhan never got back to us!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.