• You might be able to do this by using a Tally table. Jeff Moden has a great article on it.

    http://www.sqlservercentral.com/articles/T-SQL/62867/