This is more of a teradata question since I am using proc sql passthru to generate the table below.

I would like 12-29-2008 to be the start date for my table i.e. I want to assign this as the start date and with the week number corresponding to this as 209 (in a different column).

Then the next row follows with the following Monday (+7 days) and the week number corresponding to this is being incremented by 1 (i.e.209+1) . The end date for this table is 12/27/2021 (Monday)

TABLE STRUCTURE is below:

Weekstart/Monday of the week Week num

12/29/2008 209

1/5/2009 210

....

....

....

12/27/2021 887

I tried something like below but it only generated one row.

SEL WeekBegin , (WeekBegin - DATE '2008-12-29')/7 + 209 as week_num

FROM Sys_Calendar.BusinessCalendar

WHERE calendar_date = DATE '2008-12-29';

Could you please let me know how we can do an autocalculate using the syscalendar in teradata and obtain the subsequent rows i.e. the entire table all the way through 12/27/21 ?

Thanks for your help on this!