Sqlserver存储过程生成日期维度
话不多说,之前已经有一篇日志是利用oracle的存储过程生成日期维度表,接下来我们就用sqlserver来实现这个操作,如下面的步骤所示 1:创建日期维度表(Dim_time) USE [DW] GO /****** Object: Table [dbo].[Dim_time] Script Date: 12/19/2015 15:29:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Dim_time]( [the_date] [int] NOT NULL, [date_name] [nvarchar](30) NULL, [the_year] [int] NULL, [year_name] [nvarchar](30) NULL, [the_quarter] [int] NULL, [quarter_name] [nvarchar](30) NULL, [the_month] [int] NULL, [month_name] [nvarchar](30) NULL, [the_week] [int] NULL, [week_name] [nvarchar](30) NULL, [week_day] [int] NULL, [week_day_name]