SQL Server 2005
I have a table which returns
ID name prop value
--------------------------
1 one Prop1 a
1 one Prop1 b
1 one Prop2 c
2 two Prop1 d
2 two Prop2 e
How can I run a select on it to return
ID name prop value
-----------------------------
1 one Prop1 a,b
1 one Prop2 c
2 two Prop1 d
2 two Prop2 e
try this:
OUTPUT:
This will only work for two values though. Let me know and I can rewrite for N values.
Please refer: SQL Query to get aggregated result in comma seperators along with group by column in SQL Server