Home Forums Article Discussions Article Discussions by Author Discuss content posted by Amit Gaur Convert String to a Table using CTE RE: Convert String to a Table using CTE
dberra-831997
Newbie
Points: 1
More actions
December 17, 2009 at 1:38 pm
#1093743
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))