I'm working on a query which should give me result like:
|--Name--|--Surname--|--Language--|--Date-- | | James | Hetfield | en,gb,fr | 2011-01-01| | Lars | Ulrich | gb,fr,ca | 2011-01-01|
but my select gets set of rows like:
| James | Hetfield | en | 2011-01-01| | James | Hetfield | gb | 2011-01-01| | James | Hetfield | fr | 2011-01-01| | Lars | Ulrich | gb | 2011-01-01| | Lars | Ulrich | fr | 2011-01-01| | Lars | Ulrich | ca | 2011-01-01|
Which best method you recommend to convert sets of result into coma-separated values in grouped column 'on the fly'? I've found that CROSS APPLY could do the work but people says that this method is very consuming. As an addition DB has huge amount of data.
Thanks in advance, Regards, Adrian