Split a Word into Letters

Kirthiga
Posted by Kirthiga under Sql Server category on | Points: 40 | Views : 761
Declare @Name table(Name varchar(50))
insert into @Name values('DOTNETFUNDA')

select substring(a.b, v.number+1, 1) Name
from (select Name b from @Name ) a
join master..spt_values v on v.number < len(a.b)
where v.type = 'P'

Comments or Responses

Login to post response