I am trying to convert the following query into SQL Server from MySQL:
SELECT name, GROUP_CONCAT(DISTINCT language)
FROM table GROUP BY name
It seems like STRING_AGG()
is the related function name in SQL Server, but I haven't yet been able to write the correct query.
How would this be properly be done?
Update: I believe I may not have access to that function (pre 2017). How would I then do something like:
SELECT name, (select language from table ??)
FROM table GROUP BY name