有没有办法在 Visual Studio 或 SQL Server 中自定义时间维度表?
我的经理希望我在这种设置/设计中创建一个时间维度表。我希望在 Visual Studio 的澳大利亚设置中对其进行自定义。
想象一下下面的日期示例在 excel 表中。我在 excel 中手动执行此操作,因为我不知道如何按照我的经理在 Visual Studio 中想要的方式自定义它。否则,我想从 2005 年到 2025 年在 excel 中手动执行此操作并将其导入 sql server,这实际上不是一个好主意。但这是我能想到的唯一选择。我非常需要帮助。
PK_Date DateName Year Year_Name
2005-07-01 Friday, July 01, 2005 2005-12-31 2005
2005-07-02 Saturday, July 02, 2005 2005-12-31 2005
2005-07-03 Sunday, July 03, 2005 2005-12-31 2005
2005-07-04 Monday, July 04, 2005 2005-12-31 2005
2005-07-05 Tuesday, July 05, 2005 2005-12-31 2005
2005-07-06 Wednesday, July 06, 2005 2005-12-31 2005
Half_Year Half_Year_Name Quarter Quarter_Name
2008-12-31 Second Half 2008 2008-09-30 Q3, 2008
2008-12-31 Second Half 2008 2008-09-30 Q3, 2008
2008-12-31 Second Half 2008 2008-09-30 Q3, 2008
2008-12-31 Second Half 2008 2008-09-30 Q3, 2008
2008-12-31 Second Half 2008 2008-09-30 Q3, 2008
2008-12-31 Second Half 2008 2008-09-30 Q3, 2008
Month Month_Name Week Week_Name
2008-07-31 Jul-08 8/5/2008 WE: 5-8-08
2008-07-31 Jul-08 8/12/2008 WE: 12-8-08
2008-07-31 Jul-08 8/19/2008
2008-07-31 Jul-08 8/26/2008
Day_Of_Year Day_Of_Year_Name Day_Of_Half_Year Day_Of_Half_Year_Name
183 Day 183 1 Day 1
184 Day 184 2 Day 2
185 Day 185 3 Day 3
186 Day 186 4 Day 4
Day_Of_Quarter Day_Of_Quarter_Name Day_Of_Month Day_Of_Month_Name
1 Day 1 1 Day 1
2 Day 2 2 Day 2
3 Day 3 3 Day 3
4 Day 4 4 Day 4
Day_Of_Week Day_Of_Week_Name Week_Of_Year Week_Of_Year_Name
3 Day 3 27 Wk 27
4 Day 4 27 Wk 27
5 Day 5 27 Wk 27
6 Day 6 27 Wk 27
Month_Of_Year Month_Of_Year_Name Month_Of_Half_Year Month_Of_Half_Year_Name
7 Month 7 1 Month 1
7 Month 7 1 Month 1
7 Month 7 1 Month 1
7 Month 7 1 Month 1
Month_Of_Quarter Month_Of_Quarter_Name Quarter_Of_Year Quarter_Of_Year_Name
1 Month 1 3 Q3
1 Month 1 3 Q3
1 Month 1 3 Q3
Half_Year_Of_Year Half_Year_Of_Year_Name Financial_Year
2 Jul to Dec 2008 2009-06-30
2 Jul to Dec 2008 2009-06-30
2 Jul to Dec 2008 2009-06-30
2 Jul to Dec 2008 2009-06-30
Financial_Year Financial_Year_Name Financial_Half_Year
2009-06-30 2008-2009 2008-12-31
2009-06-30 2008-2009 2008-12-31
2009-06-30 2008-2009 2008-12-31
2009-06-30 2008-2009 2008-12-31
2009-06-30 2008-2009 2008-12-31
2009-06-30 2008-2009 2008-12-31
Financial_Half_Year_Name
Jul-Dec 2008-2009
Jul-Dec 2008-2009
Jul-Dec 2008-2009
Jul-Dec 2008-2009
Jul-Dec 2008-2009
Jul-Dec 2008-2009