declare @STR varchar(20)
set @STR = 'HELLO WORLD'
select SUBSTRING(@str, 1,n)
from Tally t
where N<=LEN(@str)
The 'Tally' table is simple table of numbers.... pls look for articles on Tally table here...
My Tally Table has only a single column called N.