Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sql script to populate time dimension Expand / Collapse
Author
Message
Posted Friday, January 07, 2011 5:43 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 09, 2011 1:01 AM
Points: 1, Visits: 18
Hi
I have created a time dimension with the following fields

SELECT TOP 1000 [EventDate]
,[Day]
,[Month]
,[Year]
,[DayName]
,[MonthName]
,[DayOfWeek]-----Day of a week starting on sunday
,[DayOfWeek_MTWTFSS]---Normal day of a week starting on monday
,[WeekOfYear]
,[WeekOfYear_MTWTFSS]---Normal week of the year
,[ExchangeRate]---constant as 1350.0000
,[LastDayOfMonth]
FROM [ETL].[dbo].[Dates3]

I want to create sql script or statement thal can assist me to populate the records in this dimension for the whole year. Please help
Post #1044327
Posted Wednesday, January 11, 2012 8:20 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 08, 2013 10:29 AM
Points: 2, Visits: 265
http://www.sqlservercentral.com/scripts/Data+Warehousing/62844/
Post #1234024
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse