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).

   1:  SELECT CHAR(number) FROM master..spt_values
   2:   WHERE
   3:      Type = 'P'
   4:      AND
   5:      ( number between 65 and 90
   6:          OR
   7:        number IN (197, 198, 216)
   8:      )

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

Teradata based Data Source Views in Analysis Services

Now here’s a catch. I was trying all night long to figure out why Visual Studio was hanging on me, every time I wanted to add a Teradata based relational data source. Turns out that the list of available objects gets populated with all the objects in the current server, regardles of permissions. So connecting this way to a medium sized server, may take 20 minutes, which is unusually slow IMO.

Usually I am very patient, but this one I didn’t have time to wait for. Luckily a co-worker made me wait it out and I could move on…