select top 10 orderid,stuff((select ','+product_no from orderdetail where o.orderid=orderid group by orderid,product_no for xml path('')),1,1,'')from orderdetail o group by orderid