Friday, June 23, 2017

Turning a Comma Separated string into individual rows in Sql Server

select t.ID,x.Code
    from Emp t
    cross apply (select Code from dbo.Split(t.Data,',') ) x