Archives of the TeradataForum
Message Posted: Wed, 12 Jun 2002 @ 20:12:41 GMT
Subj: | | Re: Creating months table |
|
From: | | Dieter N�th |
create table MyMonthCalendar as (
select
calendar_date - extract(day from calendar_date) + 1 as StartOfMonth
,calendar_date as FourthThursday
from sys_calendar.calendar
where weekday_of_month = 4
and day_of_week = 5
and year_of_calendar between 1999 and 2099
) with data unique primary index (StartOfMonth) ;
If you don't run V2R4 then create the table and insert/select...
Dieter
|