yanci1179
asked on
SQL Server 2008 Combining records into columns based on primary key
I have the dataset similar to the below dummy data
ID Product
1 Product A
1 Product D
2 Product A
2 Product B
2 Product C
I need the result set to be:
ID Product
1 Product A, Product D
2 Product A, Product B, Product C
I have tried XML path, but still can't get the query right, any ideas?
ID Product
1 Product A
1 Product D
2 Product A
2 Product B
2 Product C
I need the result set to be:
ID Product
1 Product A, Product D
2 Product A, Product B, Product C
I have tried XML path, but still can't get the query right, any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER