Wednesday, February 22, 2012

Using COALESCE to Build Comma-Delimited String

declare @CategoryList varchar(1000)
select @CategoryList = coalesce(@CategoryList + ', ', '') + IndividualEmailAddress from dbo.WAccessRequests
select Results = + @CategoryList

No comments: