SQL Server 2008 concatenate rows to column
问题 I am using SQL Server 2008, I have a dataset that look like: FormKey Value Category ------- ----- ------ 123456 Gloves PPE 123456 Hat PPE 123456 Scalf PPE 123456 Boots PPE 987654 Glasses PPE 987654 Harness PPE 987654 Overalls PPE I am trying to concatenate the Values and group by FormKey, so that I would end up with: Formkey Value Category ------- ----- ------- 123456 Gloves, Hat, Scalf, Boots PPE 987654 Glasses, Harness, Overalls PPE However, I am getting a concat of ALL of the Values for