Say I have a query that returns the following
ID SomeValue 1 a,b,c,d 2 e,f,g
Id like to return this as follows:
You use cross apply. Something like this:
cross apply
select t.id, s.val as SomeValue from table t cross apply dbo.split(SomeValue, ',') as s(val);