CREATE TABLE [FSIII].[FactFSIIILeveretIndsatsBenchmark](
  [FactFSIIILeveretIndsatsBenchmarkID] [bigint] identity(1,1) NOT NULL,
  [DimTid] [bigint] NULL,
  [DimKommune] [bigint] NULL,
  [DimFSIIILeveretIndsats] [bigint] NULL,
  [DimFSIIIAldersGrupperingBenchmark] [bigint] NULL,
  [LeveretIndsatser] [int] NULL,
  [UnikkeBorger] [int] NULL,
  [SYS_KommuneId] [int] NULL,
  [SYS_BatchDate] [datetime2](3) NULL,
  [SYS_RowID] AS ([FactFSIIILeveretIndsatsBenchmarkID]) ,
  [SYS_ExtractDate] [datetime2](3) NULL,
  [SYS_ExecutionId] [bigint] NULL
) 
ON [PRIMARY]
--with (data_compression = page)
GO

CREATE UNIQUE CLUSTERED INDEX [IDX_CL_FSIII_FactFSIIILeveretIndsatsBenchmark]
On [FSIII].[FactFSIIILeveretIndsatsBenchmark] ([SYS_KommuneId], [FactFSIIILeveretIndsatsBenchmarkID])
--with (data_compression = page)
ON [PRIMARY]
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Fact der indeholder benchmark for LeveretIndsats', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'ID for benchmarkn', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'FactFSIIILeveretIndsatsBenchmarkID';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Tid for benchmarkn', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'DimTid';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Kommune for benchmarkn', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'DimKommune';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Indsats for benchmarkn', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'DimFSIIILeveretIndsats';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Benchmark for benchmarkn', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'DimFSIIIAldersGrupperingBenchmark';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Antal leveret indsatser', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'LeveretIndsatser';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Antal unikke borgere', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'UnikkeBorger';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Dette er en teknisk Kolonne i FLIS. Indeholder nummeret på den kommune, som rækken tilhører', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'SYS_KommuneId';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Dette er en teknisk Kolonne i FLIS. Indeholder information om, hvilken batch rækken er indlæst i', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'SYS_BatchDate';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Dette er en teknisk Kolonne i FLIS. Indeholder et fortløbende nummer, så alle rækker i tabellen har et unikt nummer', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'SYS_RowID';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Dette er en teknisk Kolonne i FLIS. Indeholder det dato stempel, som kildefilen er markeret med', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'SYS_ExtractDate';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'SysExecutionId', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark', 
@level2type = N'COLUMN', @level2name = N'SYS_ExecutionId';
GO

EXEC sys.sp_addextendedproperty 
@name = N'DataArea', 
@value = N'sundhed', 
@level0type = N'SCHEMA', @level0name = N'FSIII', 
@level1type = N'TABLE',  @level1name = N'FactFSIIILeveretIndsatsBenchmark';
GO

