title: How to calculate working day in Date Dimension
body: <p>In Date dimension, I want to calculate WorkingDaysToDate attribute, which should indicate total  number of working days till today from the start of the month, say for example</p>
  
  <p>Today is 27th Sept (Friday), then </p>
  
  <p>WorkingDaysToDate is Total Number of working date till today in a month subtract any Weekends and Public holidays</p>
  
  <p>And result should be: </p>
  
  <p>27th Sept (Friday): 20 working days,
  28th Sept (Saturday): 20, 
  29th sept (Sun): 20 working days,
  30th Sept (Mon) then there should be 21 working days
  and so on</p>
  
  <p>I am getting correct result, for a current day using below code but I want to calculate for all the dates in date dimension :</p>
  
  <pre><code>WITH CTE AS 
  (   
  select * from dbo.Date_Dimension
  where DATEPART(MONTH,GETDATE()) = CalendarMonthNumber
  AND DATEPART(year,getdate()) = CalendarYearNumber
  AND Fulldate between DATEADD(Month,DateDiff(Month,0,Getdate()),0)  
  AND convert (Date, GETDATE()) 
  AND HolidayFlag = 0
  AND WeekDayFlag = 1     )
  
  
  Select COUNT (*) AS WorkingDayToDate from CTE 
  </code></pre>
  
  <p>And as mentioned, this will give me result only for the current date, but I want to calculate and store for all the dates in Date dimension</p>
  
  <p>Can someone please help</p>
  
  <p>Please see below create table code and sample insert code to populate date dimension for faster execution :</p>
  
  <p>To Create Date_dimension Table, use below code:</p>
  
  <pre><code>CREATE TABLE [dbo].[Date_Dimension](
  [DateSK] [int] NOT NULL,
  [FullDate] [datetime] NOT NULL,
  [Day] [tinyint] NOT NULL,
  [DaySuffix] [varchar](4) NOT NULL,
  [DayOfWeek] [varchar](9) NOT NULL,
  [DayOfWeekNumber] [int] NOT NULL,
  [DayOfWeekInMonth] [tinyint] NOT NULL,
  [DayOfYearNumber] [int] NOT NULL,
  [RelativeDays] [int] NOT NULL,
  [WeekOfYearNumber] [tinyint] NOT NULL,
  [WeekOfMonthNumber] [tinyint] NOT NULL,
  [RelativeWeeks] [int] NOT NULL,
  [CalendarMonthNumber] [tinyint] NOT NULL,
  [CalendarMonthName] [varchar](9) NOT NULL,
  [RelativeMonths] [int] NOT NULL,
  [CalendarQuarterNumber]     [tinyint] NOT NULL,
  [CalendarQuarterName]     [varchar](6) NOT NULL,
  [RelativeQuarters]     [int] NOT NULL,
  [CalendarYearNumber]     [int] NOT NULL,
  [RelativeYears]     [int] NOT NULL,
  [StandardDate]     [varchar](10) NULL,
  [WeekDayFlag]     [bit] NOT NULL,
  [HolidayFlag]     [bit] NOT NULL,
  [OpenFlag]     [bit] NOT NULL,
  [FirstDayOfCalendarMonthFlag]     [bit] NOT NULL,
  [LastDayOfCalendarMonthFlag]     [bit] NOT NULL,
  [HolidayText]     [varchar](50) NULL,
  CONSTRAINT     [PK_DimDate] PRIMARY KEY CLUSTERED 
  (
  [DateSK] ASC
  )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON     [PRIMARY]
  ) ON     [PRIMARY]
  
  GO
  </code></pre>
  
  <p>And to populate sample data, you can use below code:</p>
  
  <pre><code>INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130901,'2013-09-01 00:00:00.000',1,'1st','Sunday',1,1,244,-26,36,1,-3,9,'September',0,3,'Third',0,2013,0,'09/01/2013',0,0,0,1,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130902,'2013-09-02 00:00:00.000',2,'2nd','Monday',2,1,245,-25,36,1,-3,9,'September',0,3,'Third',0,2013,0,'09/02/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130903,'2013-09-03 00:00:00.000',3,'3rd','Tuesday',3,1,246,-24,36,1,-3,9,'September',0,3,'Third',0,2013,0,'09/03/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130904,'2013-09-04 00:00:00.000',4,'4th','Wednesday',4,1,247,-23,36,1,-3,9,'September',0,3,'Third',0,2013,0,'09/04/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130905,'2013-09-05 00:00:00.000',5,'5th','Thursday',5,1,248,-22,36,1,-3,9,'September',0,3,'Third',0,2013,0,'09/05/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130906,'2013-09-06 00:00:00.000',6,'6th','Friday',6,1,249,-21,36,1,-3,9,'September',0,3,'Third',0,2013,0,'09/06/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130907,'2013-09-07 00:00:00.000',7,'7th','Saturday',7,1,250,-20,36,1,-3,9,'September',0,3,'Third',0,2013,0,'09/07/2013',0,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130908,'2013-09-08 00:00:00.000',8,'8th','Sunday',1,2,251,-19,37,2,-2,9,'September',0,3,'Third',0,2013,0,'09/08/2013',0,0,0,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130909,'2013-09-09 00:00:00.000',9,'9th','Monday',2,2,252,-18,37,2,-2,9,'September',0,3,'Third',0,2013,0,'09/09/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130910,'2013-09-10 00:00:00.000',10,'10th','Tuesday',3,2,253,-17,37,2,-2,9,'September',0,3,'Third',0,2013,0,'09/10/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130911,'2013-09-11 00:00:00.000',11,'11th','Wednesday',4,2,254,-16,37,2,-2,9,'September',0,3,'Third',0,2013,0,'09/11/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130912,'2013-09-12 00:00:00.000',12,'12th','Thursday',5,2,255,-15,37,2,-2,9,'September',0,3,'Third',0,2013,0,'09/12/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130913,'2013-09-13 00:00:00.000',13,'13th','Friday',6,2,256,-14,37,2,-2,9,'September',0,3,'Third',0,2013,0,'09/13/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130914,'2013-09-14 00:00:00.000',14,'14th','Saturday',7,2,257,-13,37,2,-2,9,'September',0,3,'Third',0,2013,0,'09/14/2013',0,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130915,'2013-09-15 00:00:00.000',15,'15th','Sunday',1,3,258,-12,38,3,-1,9,'September',0,3,'Third',0,2013,0,'09/15/2013',0,0,0,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130916,'2013-09-16 00:00:00.000',16,'16th','Monday',2,3,259,-11,38,3,-1,9,'September',0,3,'Third',0,2013,0,'09/16/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130917,'2013-09-17 00:00:00.000',17,'17th','Tuesday',3,3,260,-10,38,3,-1,9,'September',0,3,'Third',0,2013,0,'09/17/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130918,'2013-09-18 00:00:00.000',18,'18th','Wednesday',4,3,261,-9,38,3,-1,9,'September',0,3,'Third',0,2013,0,'09/18/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130919,'2013-09-19 00:00:00.000',19,'19th','Thursday',5,3,262,-8,38,3,-1,9,'September',0,3,'Third',0,2013,0,'09/19/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130920,'2013-09-20 00:00:00.000',20,'20th','Friday',6,3,263,-7,38,3,-1,9,'September',0,3,'Third',0,2013,0,'09/20/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130921,'2013-09-21 00:00:00.000',21,'21st','Saturday',7,3,264,-6,38,3,-1,9,'September',0,3,'Third',0,2013,0,'09/21/2013',0,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130922,'2013-09-22 00:00:00.000',22,'22nd','Sunday',1,4,265,-5,39,4,0,9,'September',0,3,'Third',0,2013,0,'09/22/2013',0,0,0,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130923,'2013-09-23 00:00:00.000',23,'23rd','Monday',2,4,266,-4,39,4,0,9,'September',0,3,'Third',0,2013,0,'09/23/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130924,'2013-09-24 00:00:00.000',24,'24th','Tuesday',3,4,267,-3,39,4,0,9,'September',0,3,'Third',0,2013,0,'09/24/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130925,'2013-09-25 00:00:00.000',25,'25th','Wednesday',4,4,268,-2,39,4,0,9,'September',0,3,'Third',0,2013,0,'09/25/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130926,'2013-09-26 00:00:00.000',26,'26th','Thursday',5,4,269,-1,39,4,0,9,'September',0,3,'Third',0,2013,0,'09/26/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130927,'2013-09-27 00:00:00.000',27,'27th','Friday',6,4,270,0,39,4,0,9,'September',0,3,'Third',0,2013,0,'09/27/2013',1,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130928,'2013-09-28 00:00:00.000',28,'28th','Saturday',7,4,271,1,39,4,0,9,'September',0,3,'Third',0,2013,0,'09/28/2013',0,0,1,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130929,'2013-09-29 00:00:00.000',29,'29th','Sunday',1,5,272,2,40,5,1,9,'September',0,3,'Third',0,2013,0,'09/29/2013',0,0,0,0,0,NULL)
  INSERT INTO Date_dimension(DateSK,FullDate,Day,DaySuffix,DayOfWeek,DayOfWeekNumber,DayOfWeekInMonth,DayOfYearNumber,RelativeDays,WeekOfYearNumber,WeekOfMonthNumber,RelativeWeeks,CalendarMonthNumber,CalendarMonthName,RelativeMonths,CalendarQuarterNumber,CalendarQuarterName,RelativeQuarters,CalendarYearNumber,RelativeYears,StandardDate,WeekDayFlag,HolidayFlag,OpenFlag,FirstDayOfCalendarMonthFlag,LastDayOfCalendarMonthFlag,HolidayText) VALUES (20130930,'2013-09-30 00:00:00.000',30,'30th','Monday',2,5,273,3,40,5,1,9,'September',0,3,'Third',0,2013,0,'09/30/2013',1,0,1,0,1,NULL)
  </code></pre>