CREATE TABLE [Økonomi].[DimOpusProfitcenter](
  [DimOpusProfitcenterID] [bigint] NOT NULL,
  [Kommunenummer] [int] NULL,
  [ProfitcenterNiv1Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv1Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv1NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv2Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv2Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv2NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv3Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv3Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv3NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv4Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv4Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv4NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv5Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv5Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv5NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv6Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv6Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv6NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv7Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv7Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv7NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv8Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv8Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv8NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv9Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv9Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv9NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv10Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv10Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv10NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv11Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv11Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv11NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv12Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv12Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv12NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv13Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv13Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv13NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv14Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv14Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv14NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv15Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv15Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv15NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv16Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv16Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv16NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv17Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv17Navn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv17NummerOgNavn] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv18Nummer] [varchar](500) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv18Navn] [varchar](120) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterNiv18NummerOgNavn] [varchar](190) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterFuldKontonummer] [varchar](750) COLLATE Norwegian_100_CI_AS NULL,
  [ProfitcenterFuldKontonavn] [varchar](1500) COLLATE Norwegian_100_CI_AS NULL,
  [SYS_KommuneId] [int] NULL,
  [SYS_BatchDate] [datetime2](3) NULL,
  [SYS_RowID] [bigint] identity(1,1) NOT NULL,
  [SYS_ExtractDate] [datetime2](3) NULL,
  [SYS_ExecutionId] [bigint] NULL,
  CONSTRAINT PK_DimOpusProfitcenter PRIMARY KEY CLUSTERED (DimOpusProfitcenterID)
) 
ON [PRIMARY]
--with (data_compression = page)
GO

CREATE INDEX [IDX_Kommune_Økonomi_DimOpusProfitcenter]
On [Økonomi].[DimOpusProfitcenter] ([SYS_KommuneId], [SYS_ExecutionId])
--with (data_compression = page)
ON [PRIMARY]
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Dimension med hierarki for profitcenter fra Opus systemet', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Surrogatnøgle', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'DimOpusProfitcenterID';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Kommunenummer', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'Kommunenummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 1', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv1Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 1', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv1Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 1', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv1NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 2', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv2Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 2', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv2Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 2', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv2NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 3', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv3Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 3', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv3Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 3', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv3NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 4', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv4Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 4', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv4Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 4', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv4NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 5', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv5Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 5', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv5Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 5', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv5NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 6', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv6Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 6', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv6Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 6', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv6NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 7', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv7Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 7', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv7Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 7', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv7NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 8', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv8Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 8', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv8Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 8', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv8NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 9', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv9Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 9', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv9Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 9', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv9NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 10', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv10Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 10', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv10Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 10', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv10NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 11', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv11Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 11', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv11Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 11', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv11NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 12', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv12Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 12', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv12Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 12', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv12NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 13', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv13Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 13', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv13Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 13', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv13NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 14', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv14Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 14', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv14Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 14', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv14NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 15', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv15Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 15', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv15Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 15', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv15NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 16', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv16Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 16', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv16Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 16', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv16NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 17', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv17Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 17', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv17Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 17', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv17NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Nummer til Profitcenter niveau 18', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv18Nummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Navn til Profitcenter niveau 18', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv18Navn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat nummer og navn til Profitcenter niveau 18', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterNiv18NummerOgNavn';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat kontonummer', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterFuldKontonummer';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Sammensat kontonavn', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'ProfitcenterFuldKontonavn';
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'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@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'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@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'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@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'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter', 
@level2type = N'COLUMN', @level2name = N'SYS_ExtractDate';
GO

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

EXEC sys.sp_addextendedproperty 
@name = N'DataArea', 
@value = N'oekonomi', 
@level0type = N'SCHEMA', @level0name = N'Økonomi', 
@level1type = N'TABLE',  @level1name = N'DimOpusProfitcenter';
GO

