How do I get a random sort of the comma delimited colors?
SELECT Subcategory = ps.[Name], ColorList = Stuff((SELECT DISTINCT ', ' + Color AS [text()] FROM AdventureWorks2012.Production.Product p WHERE p.ProductSubcategoryID = ps.ProductSubcategoryID FOR XML PATH ('')),1,1,'') FROM AdventureWorks2012.Production.ProductSubcategory ps ORDER BY Subcategory; GO -- Black, Blue, Red
Kalman Toth Database & OLAP Architect
IPAD SELECT Query Video Tutorial 3.5 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012