1)-1 ) AS VARCHAR(20)) AS code_cd , SUBSTRING(rem,CHARINDEX(',',rem,1)+1,4000) rem , Level+1 AS Level FROM CTEshredding WHERE rem IS NOT NULL AND LEN(rem) > 1 ) ... Obviously I had to "roll my own" SQL Server tally table, rather than just generate one ...
↧