I have searched everywhere and I cannot find this implementation anywhere.
Let\'s say I have the word: QWERTY
I want to obtain this table:
Here you have it:
create table #words (
character varchar(1)
)
declare @test varchar(10)
select @test = 'QWERTY'
declare @count int, @total int
select @total = len(@test), @count = 0
while @count <= @total
begin
insert into #words select substring(@test, @count, 1)
select @count = @count + 1
end
select * from #words
drop table #words