I need a similar function to Oracle WM_CONCAT in SQL Server, which returns a comma separated list of whatever field you pass it as argument. For example, in Ora
WM_CONCAT
In SQL Server 2017 STRING_AGG function has been added
SELECT t.name as TableName ,STRING_AGG(c.name, ';') AS FieldList FROM sys.tables t JOIN sys.columns c ON t.object_id = c.object_id GROUP BY t.name;