I am currently working on creating my first Data_warehouse using sql-server
Data_warehouse using sql-server
I have a Date dimension i want to populate it using SSIS it ha
Date dimension
Here is a function for iso_year, the logic behind it is that the thursday of the week from the parameter date determine the year:
CREATE FUNCTION [dbo].[f_isoyear] ( @p_date datetime ) RETURNS int as BEGIN RETURN datepart(yy, dateadd(wk, datediff(d, 0, @p_date)/7, 3)) END