Monday, September 4, 2017

STRING_AGG is a new string function in SQL Server 2017

You can create comma separated, concatenated strings from values in columns in a database. The concatenated strings are separated by a separator which gets added except for the end of the string.

The full syntax is here:

STRING_AGG ( expression, separator ) [ <order_clause> ]

<order_clause> ::=  
    WITHIN GROUP ( ORDER BY <order_by_expression_list> [ ASC | DESC ] ) 


If you have SQL Server 2016, this will not work as shown here.


But it does recognize it as a function because I am using SQL Server Management Studio v17


Why not download SQL Server 2017 RC2 and try?

No comments:

Post a Comment

I am not paying this invoice. I am disregarding it, becuase....

 I am not paying this invoice because MICROSOFT has not provided me with a satisfactory way to access my account since June of this year des...