![]() |
|
Archives of the TeradataForumMessage Posted: Fri, 09 Jan 2009 @ 18:41:04 GMT
Look at the calculation below for "week_number" and see if it will work for you....
SEL calendar_date
,(((calendar_date - CAST(((EXTRACT(YEAR FROM
calendar_date)-1900)*10000) + 101 AS DATE))) / 7)+1 AS week_number
FROM sys_calendar.calendar
WHERE calendar_date BETWEEN '2008-01-01' AND '2009-12-31'
ORDER BY 1
Dirk Anderson
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||