Author |
Topic |
raj vardhan43
Starting Member
20 Posts |
Posted - 2012-12-10 : 18:04:36
|
Hi Friends,I need your suggestion.We have a SQL SERVER 2008R2 dataware house. In this we have a table "DimTime". This DimTime table contains only data/records until 2013. NOW, we have to populate 2014 data/records also into DimTime table.My manager told me to find/search the StoredProcedure/script inside the prod SQL SERVER 2008R2 dataware house which they used earlier to populate data into DimTime. I had checked all the stored procedures/scripts but i couldn't find it.Question: Is it possible to populate DimTime other than storedprocs/scripts ?? Am I doing this correctly ??Thanks for your timeraj |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-12-10 : 19:30:03
|
Use this query to find the stored procedures that contain the word DimeTime. SELECT * FROM sys.objects WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%DimTime%' If you don't find what you are looking for, it is possible that someone just ran a script to populate the table. If you post table schema along with a sample of the data you are trying to generate, people on the forum would be able to suggest how to do it. |
|
|
raj vardhan43
Starting Member
20 Posts |
Posted - 2012-12-10 : 20:21:22
|
Thank you so muchraj |
|
|
raj vardhan43
Starting Member
20 Posts |
Posted - 2012-12-18 : 17:45:35
|
hi sunita,below is the defintion for our DimTime tableCREATE TABLE [dbo].[DimTime]( [PK_Date] [datetime] NOT NULL, [Date_Name] [nvarchar](50) NULL, [Year] [datetime] NULL, [Year_Name] [nvarchar](50) NULL, [Half_Year] [datetime] NULL, [Half_Year_Name] [nvarchar](50) NULL, [Quarter] [datetime] NULL, [Quarter_Name] [nvarchar](50) NULL, [Month] [datetime] NULL, [Month_Name] [nvarchar](50) NULL, [Week] [datetime] NULL, [Week_Name] [nvarchar](50) NULL, [Day_Of_Year] [int] NULL, [Day_Of_Year_Name] [nvarchar](50) NULL, [Day_Of_Half_Year] [int] NULL, [Day_Of_Half_Year_Name] [nvarchar](50) NULL, [Day_Of_Quarter] [int] NULL, [Day_Of_Quarter_Name] [nvarchar](50) NULL, [Day_Of_Month] [int] NULL, [Day_Of_Month_Name] [nvarchar](50) NULL, [Day_Of_Week] [int] NULL, [Day_Of_Week_Name] [nvarchar](50) NULL, [Week_Of_Year] [int] NULL, [Week_Of_Year_Name] [nvarchar](50) NULL, [Month_Of_Year] [int] NULL, [Month_Of_Year_Name] [nvarchar](50) NULL, [Month_Of_Half_Year] [int] NULL, [Month_Of_Half_Year_Name] [nvarchar](50) NULL, [Month_Of_Quarter] [int] NULL, [Month_Of_Quarter_Name] [nvarchar](50) NULL, [Quarter_Of_Year] [int] NULL, [Quarter_Of_Year_Name] [nvarchar](50) NULL, [Quarter_Of_Half_Year] [int] NULL, [Quarter_Of_Half_Year_Name] [nvarchar](50) NULL, [Half_Year_Of_Year] [int] NULL, [Half_Year_Of_Year_Name] [nvarchar](50) NULL, [GL_YEAR] [varchar](50) NULL, [GL_PERIOD] [varchar](50) NULL, [GL_MONTH] [varchar](50) NULL, [GL_QUARTER] [varchar](50) NULL, CONSTRAINT [PK_Time1] PRIMARY KEY CLUSTERED ( [PK_Date] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]Below is the sample data 2007-01-01 00:00:00.000 ,Monday , January 01 2007 ,2007-01-01 00:00:00.000 ,Calendar 2007 ,2007-01-01 00:00:00.000 ,Semester 1 , 2007 ,2007-01-01 00:00:00.000 ,Quarter 1 , 2007 ,2007-01-01 00:00:00.000 ,January 2007 ,2007-01-01 00:00:00.000 ,Week 1 , 2007 ,1 ,Day 1 ,1 ,Day 1 ,1 ,Day 1 ,1 ,Day 1 ,2 ,Day 2 ,1 ,Week 1 ,1 ,Month 1 ,1 ,Month 1 ,1 ,Month 1 ,1 ,Quarter 1 ,1 ,Quarter 1 ,1 ,Semester 1 ,2007 ,JAN-07 ,JAN ,Q1Please suggest me any idea to extend the DimTime table range.quote: Originally posted by sunitabeck Use this query to find the stored procedures that contain the word DimeTime. SELECT * FROM sys.objects WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%DimTime%' If you don't find what you are looking for, it is possible that someone just ran a script to populate the table. If you post table schema along with a sample of the data you are trying to generate, people on the forum would be able to suggest how to do it.
[url][/url]raj |
|
|
|
|
|