i have this query which return 3 rows as xml
Value 1
value 2
value 3
i want instead of rows it should return comma sepearted values like
value 1, value 2, value 3
SELECT distinct p.ProductName
FROM dbo.Meals AS meals
INNER JOIN dbo.MealRecipes AS mr ON mr.MealID = meals.MealID
INNER JOIN dbo.Recipes AS rec ON rec.RecipeID = mr.RecipeID
INNER JOIN dbo.Products AS p ON p.ProductID = rec.ProductID
ORDER BY p.ProductName
FOR XML PATH ('Item'), TYPE