How to concatenate values with specified delimiter

In SQL Server 2017, new function is introduced to concatenate values with specified delimiter

In SQL Server 2012, Concat() was introduced. Only difference between Concat() and Concat_WS(), Concat_WS() allows delimiter to be specified to concatenate values.

Both CONCAT & CONCAT_WS ignores the SET CONCAT_NULL_YIELDS_NULL {ON|OFF} setting as shown in below image.






Concat_WS() requires atleast three arguments:





See Also:


No comments: