Archives of the TeradataForum
Message Posted: Fri, 24 Feb 2012 @ 14:34:37 GMT
this might give you an idea.
if day of month = 15 get the next 7 days as well..
select * from sys_calendar.calendar where year_of_calendar = 2012 qualify 1 = max(case when day_of_month = 15 then 1 else 0 end) over (order by calendar_Date desc rows between current row and 7 following) order by calendar_date;
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|