Hello
I am using SQL Server 2014.
I want to report on three fields:
Ref, field 1, field 2
current output is:
REF Field 1 Field 2
1 a x
1 b y
1 c z
My desired output is just to have the distinct value of Ref - in this case, '1' , appear once and the other fields to appear on one line but with the values separated by a comma, so, desired output =
REF Field 1 Field 2
1 a,b,c x,y,z
please can you advise how I can achieve this?
Thanks