I tend to go the dynamic route.
I have a table called Integers that has one column Num
with the values 0,1,2,3,4,5,6,7,8,9.
I then have a query called Numbers that generates all the numbers up to 10,000.
It has the Integers table added 4 times with no joins.
SELECT...