Hi Mark,
using a loop to create a range of numbers is not the best way :-)
I prefer a table with numbers in it, if you don't have it you could easily use the sys_calendar:
select day_of_calendar -1 as x from sys_calendar.calendar
where x between 0 and 400
Dieter
↧