ErnestDCook
Programmer
Needing to have holidays noted in my dimTime table created with the BI tools I started my search. I started with adding a new bit field (isHoliday). Failing to find a perfect solution I started putting together posts. First a shout out to the below thread that gave me the core logic for updating the dimTime table for thanksgiving days
UPDATE [AllianceDW].[dbo].[dimTime]
SET [IsHoliday] = '1'
WHERE pk_date IN
(SELECT DISTINCT TOP 100
dateadd(wk, datediff(wk, 0, convert(varchar(4), convert(smallint,YEAR([year])))+'1124'), 3)
FROM dimtime
ORDER BY dateadd(wk, datediff(wk, 0, convert(varchar(4), convert(smallint,YEAR([year])))+'1124'), 3)
)
Than another post gave me a lot of other holidays. It is at:
UPDATE [AllianceDW].[dbo].[dimTime]
SET [IsHoliday] = '1'
WHERE pk_date IN
(SELECT DISTINCT TOP 100
dateadd(wk, datediff(wk, 0, convert(varchar(4), convert(smallint,YEAR([year])))+'1124'), 3)
FROM dimtime
ORDER BY dateadd(wk, datediff(wk, 0, convert(varchar(4), convert(smallint,YEAR([year])))+'1124'), 3)
)
Than another post gave me a lot of other holidays. It is at: