STRING_AGG – A New function in SQL Server 2017

0
STRING_AGG – A New function in SQL Server 2017
5 (100%) 1 vote

STRING_AGG is an interesting aggregated function. It concatenates the values of string expressions and places separator values between them. And what more? The separator is not added at the end of string. Yeah!

This will produce following result:

You can also use CHAR() function to add any printable or non-printable character you want as separator.

It’s important to note that STRING_AGG ignore NULL values.

 

 

You might also like

Leave A Reply

Your email address will not be published.