Answer the question
In order to leave comments, you need to log in
Is there an aggregate function in T-SQL to concatenate strings?
My query returns result like this:
Employee PollNumber
------------ ----------
Alex 12
Alex 13
Alex 14
Bob 15
Bob 16
Sam 17
I need to write a query that groups Employee together and displays a list of PollNumbers:Employee PollNumbers
------------ -----------
Alex 12, 13, 14
Bob 15, 16
Sam 17
Answer the question
In order to leave comments, you need to log in
for xml
examples
Applies to: yesSQL Server (all supported versions)
from 2005 version. did not exist in 2000
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question