| Start |
|---|
| Split string in Sql Server 2008/2012/2014 using XML Since there is no Example: Result: |
| Split a String in Sql Server 2016 In SQL Server 2016 finally they have introduced Split string function : Parameters: It accepts two parameters String: Is an expression of any character type (i.e. nvarchar, varchar, nchar or char). separator : Is a single character expression of any character type (e.g. nvarchar(1), varchar(1), nchar(1) or char(1)) that is used as separator for concatenated strings. Note: You should always check if the expression is a non-empty string. Example: In above example Result : If it's an empty string: Result : You can avoid the above situation by adding a |
T-SQL Table variable and XML |
Read Article
https://develop.horje.com/learn/1434/reference