forked from smmks/SQLPersianDateDimension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DateDimensionTabel.sql
29 lines (28 loc) · 928 Bytes
/
DateDimensionTabel.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
CREATE TABLE dbo.Dim_Date (
[DateKey] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
[time_Stamp] DATETIME NOT NULL,
[Date] DATE NOT NULL,
[ShDate] VARCHAR(13) NOT NULL,
[ShWeekday] TINYINT NOT NULL,
[ShWeekDayName] NVARCHAR(20) NOT NULL,
[ShMonth] TINYINT NOT NULL,
[ShMonthName] NVARCHAR(20) NOT NULL,
[ShQuarter] TINYINT NOT NULL,
[ShQuarterName] NVARCHAR(20) NOT NULL,
[ShYYYY] INT NOT NULL,
[ShYYYYMM] CHAR(7) NOT NULL,
[ShYYYYQQ] CHAR(7) NOT NULL,
[Day] TINYINT NOT NULL,
[Weekday] TINYINT NOT NULL,
[WeekDayName] VARCHAR(10) NOT NULL,
[Month] TINYINT NOT NULL,
[MonthName] VARCHAR(10) NOT NULL,
[Quarter] TINYINT NOT NULL,
[QuarterName] VARCHAR(6) NOT NULL,
[Year] INT NOT NULL,
[YYYYMM] CHAR(6) NOT NULL,
[YYYYQQ] CHAR(6) NOT NULL,
[MonthYear] CHAR(7) NOT NULL,
[IsWeekend] BIT NOT NULL,
[IsHoliday] BIT NOT NULL,
)