I just found this online a couple days ago. I tried it and it worked great for me. Give it a go and see how you get along.
http://groupconcat.codeplex.com/
http://groupconcat.codeplex.com/releases/view/618110
Create TABLE testtable(
Customer VARCHAR(50),
Product VARCHAR(50),
Method VARCHAR(50),
INDEX ix CLUSTERED (Customer)
)
INSERT INTO testtable (Customer, Product, Method)
VALUES
('John', 'Computer', 'Credit'),
('John', 'Mouse', 'Cash'),
('Will', 'Computer', 'Credit'),
('Will', 'Mouse', 'Cash'),
('Will', 'Speaker', 'Cash'),
('Todd', 'Computer', 'Credit')
Select *
From testtable
SELECT Customer,dbo.GROUP_CONCAT(product),dbo.GROUP_CONCAT(method)
FROM testtable
GROUP BY Customer
