Possible Duplicate:
Simulating group_concat MySQL function in SQL Server 2005?
What's the best way to achieve this? Edit: in MSSQL 2005
Table
a | b
------------
x | 1
x | 4
y | 6
y | 1
Query:
SELECT ? FROM Table
so that output is :
a | ListOfB
------------
x | 1, 4
y | 6, 1