A better way to parse integer values from a T-SQL delimited string

前端 未结 3 1497
醉梦人生
醉梦人生 2021-01-16 05:21

I have a SQLServer2008 R2 Stored Procedure that contains an algorithm for parsing out integers from a delimited string.

Here\'s an example of the SQL code that I mad

3条回答
  •  天涯浪人
    2021-01-16 05:31

    From MSSql Server 2016, there is a new keyword introduced STRING_SPLIT to do the desired operation.

    SELECT STRING_SPLIT ( string , separator )
    

    Refer https://msdn.microsoft.com/en-us/library/mt684588.aspx

提交回复
热议问题