DECLARE @string VARCHAR(50)
DECLARE @i INT
SET @string = 'your String'
SET @i = 0
WHILE @i <= DATALENGTH(@string)
BEGIN
PRINT SUBSTRING(@string, @i, 1) + ' : ' + CAST(ASCII(SUBSTRING(@string, @i, 1)) AS VARCHAR(3))
SET @i = @i + 1
END
No comments:
Post a Comment