select Sort_Plan_Number, stuff(select ',' + MyOtherField as NewField from myTable T where T.Sort_Plan_Number = T1.Sort_Plan_Number and Valid_Status = -3300 for XML PATH('')),1,1,'') as NewField from dbo.StagingRollup WHERE Valid_Status = -3300 GROUP BY Sort_Plan_NumberSee explanation of this technique in these blogs:
>>;with cte as (select *, row_number() over ( >>partition by Sort_Plan_Number order by Sort_Plan_Number) as Row >> from dbo.StagingRollup >> WHERE Valid_Status = -3300 ) >> >>select * from cte where Row = 1>>