Could you help me one case, below
I have an original table, like this:
+++++++++++++++++++++++++++
Col1 | Col2
+++++++++++++++++++++++++++
A | 1
A | 2
A | 3
B | 4
B | 5
then I want a result is like this:
+++++++++++++++++++++++++++
Col1 | Col2
+++++++++++++++++++++++++++
A | 1,2,3
B | 4,5
How should I do this in SQL Server?
1 Answer