I want to use memory optimization/natively compiled stored procedure features to benefit from performance improvements. So, I guess I have to upgrade SQL Server 2012 to SQL Server 2016. Ideally I would like to reuse some of the T-SQL code.
I have migrated some code but previously I was relying heavily on using GROUP_CONCAT() function to aggregate strings which is a custom CLR aggregate function. It basically concats strings (delimited by comma) when using GROUP BY, like follows;
SELECT City, dbo.GROUP_CONCAT(FirstName) AS Names
FROM Persons
GROUP BY City
City Names
London Mark,Scott,Rob
Paris Francois,Liza
But since CLR functions can't be used with natively compiled stored procedure, can anyone suggest some way of achieving the desired output.
I am aware of FOR XML PATH approach to get similar results, but that too is not supported in natively compiled stored procedure.
Also, please note that, I have places where multiple columns are specified in the GROUP BY clause.