This is your reply serg. And it works for me.The other message were just idea where I use this code. thank serg.
DECLARE @str varchar(16), @i int
SET @str = 'DEMO'
SET @i = 1
WHILE (@i <= DATALENGTH(@str)) BEGIN
PRINT SUBSTRING(@str, @i,1)
SET @i = @i + 1
END
Roses are #FF0000 Violets are #0000FF all my base are belong to you