Does anybody have calendar dimension design and scripts. If it is big, can you please mail to my id email@example.com?
I want to have holiday, weekend, and more indicators country( if possible) and some field indicators.
Thanks and regards,
CAST(DAY_DT AS DATE),
WHERE ROW_WID BETWEEN '20140101' AND '20140131' ORDER BY ROW_WID ASC
Your current calendar is an Oracle calendar :-)
What about 2013-12-30 and 2013-12-31, should it be 2014 Week 01, too, or 2013 Week 53?
assuming that 2013 Week52 was a typo and should be 53, too?
This is based on the built-in sys_calendar, so you can easily adjust it to your calendar:
-- Jan 1st = ((calendar_date / 10000 * 10000) + 101 (DATE))
-- Find the previous monday <= Jan 1st
-- Calculate the number of days between the date and that monday
-- MOD 7 + 1 returns the week number
- (((calendar_date / 10000 * 10000) + 101 (DATE))
- (((calendar_date / 10000 * 10000) + 101 (DATE)) - DATE '0001-01-01') MOD 7
) / 7 +1 AS wk
Can you mail me the design and scripts for creating calendar dimension table please @firstname.lastname@example.org
Thanks in advance !