• I used this function with data pasted from a column or data from excel. Short of some additional error checking it is a handy techique:

    declare @STR varchar(max)

    select @STR =

    'line1

    line2

    line3

    line4'

    SELECT item FROM strToTable(@str,char(13))