Omer-Pitou
asked on
Equivalent MySQL group_concat in SQL Server
Hi,
My table looks like this:
Field1 Field2
1 A
1 B
1 C
2 A
2 B
With this mysql command select field1, group_concat(field2) as field2 from t1 Group by field1, I could achieve this:
Field1 Field2
1 A,B,C
2 A,B
How can I achieve this SQL Server 2008 R2
Regards
My table looks like this:
Field1 Field2
1 A
1 B
1 C
2 A
2 B
With this mysql command select field1, group_concat(field2) as field2 from t1 Group by field1, I could achieve this:
Field1 Field2
1 A,B,C
2 A,B
How can I achieve this SQL Server 2008 R2
Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
See it working here on SQL Fiddle