How to generate the alphabet from ASCII codes in T-SQL

Just now I had the requirement to create a loop in SSIS, and have that loop the alphabet.
In order to facilitate that, I generated a T-SQL statement, that provides the alphabet including the Danish Æ, Ø and Å. If you don’t need these, you can leave out the latter part of the last where clause (197, 198, 216).

Link to an ASCII table with possible values ranging from 0 to 255.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.