CREATE TABLE [D190-10-1].[DSAHIST_KRL_PersonaleLoen](
  [per_krl] [int] NULL,
  [RC] [smallint] NULL,
  [LSYS] [varchar](2) COLLATE Norwegian_100_CI_AS NULL,
  [PER] [smallint] NULL,
  [PRODATO] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [SENR] [int] NULL,
  [BRNR] [varchar](4) COLLATE Norwegian_100_CI_AS NULL,
  [AMT] [smallint] NULL,
  [KOM] [smallint] NULL,
  [CPR] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [CPRCNT] [smallint] NULL,
  [MNUMMER] [int] NULL,
  [LGRAD] [varchar](4) COLLATE Norwegian_100_CI_AS NULL,
  [PENSGRAD] [varchar](4) COLLATE Norwegian_100_CI_AS NULL,
  [ANSDATO] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [TJSSTED] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [TJSDATO] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [AFD] [varchar](8) COLLATE Norwegian_100_CI_AS NULL,
  [ANCDATO] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [INST] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [KNT] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [ANSSTA] [varchar](2) COLLATE Norwegian_100_CI_AS NULL,
  [LKL] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [TRIN] [varchar](2) COLLATE Norwegian_100_CI_AS NULL,
  [AFL] [varchar](1) COLLATE Norwegian_100_CI_AS NULL,
  [BESK] [decimal](8,2) NULL,
  [NMTIMER] [int] NULL,
  [PERST] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [PERSL] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [AINDK] [int] NULL,
  [ANSFORM] [smallint] NULL,
  [PENSBID] [smallint] NULL,
  [DISCOKODE] [varchar](8) COLLATE Norwegian_100_CI_AS NULL,
  [DISCODATO] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [JOBSTATUS] [varchar](2) COLLATE Norwegian_100_CI_AS NULL,
  [JOBDATO] [varchar](10) COLLATE Norwegian_100_CI_AS NULL,
  [FASTLOEN] [int] NULL,
  [PENSLOEN] [int] NULL,
  [FERIEDAGE] [smallint] NULL,
  [FERIEGODT] [smallint] NULL,
  [FERIELOEN] [int] NULL,
  [LOKALSTK] [varchar](4) COLLATE Norwegian_100_CI_AS NULL,
  [IMKNT] [varchar](11) COLLATE Norwegian_100_CI_AS NULL,
  [CVR] [varchar](8) COLLATE Norwegian_100_CI_AS NULL,
  [LOS] [varchar](100) COLLATE Norwegian_100_CI_AS NULL,
  [LOSTEXT] [varchar](255) COLLATE Norwegian_100_CI_AS NULL,
  [LEDERKODE] [varchar](2) COLLATE Norwegian_100_CI_AS NULL,
  [PNUMMER] [bigint] NULL,
  [fld_stat] [varchar](1) COLLATE Norwegian_100_CI_AS NULL,
  [stk] [varchar](7) COLLATE Norwegian_100_CI_AS NULL,
  [stk3tekstKrl] [varchar](50) COLLATE Norwegian_100_CI_AS NULL,
  [stk5tekstKrl] [varchar](50) COLLATE Norwegian_100_CI_AS NULL,
  [losknt] [varchar](5) COLLATE Norwegian_100_CI_AS NULL,
  [fuldtid] [decimal](24,4) NULL,
  [admgrp] [varchar](1) COLLATE Norwegian_100_CI_AS NULL,
  [flexfaktor] [decimal](2,1) NULL,
  [SYS_KommuneId] [int] NULL,
  [SYS_BatchDate] [datetime2](3) NULL,
  [SYS_RowID] [bigint] identity(1,1) NOT NULL,
  [SYS_ExtractDate] [datetime2](3) NULL,
  [SYS_SourceFileID] [varchar](80) COLLATE Norwegian_100_CI_AS NULL,
  [SYS_RettelserTidAngivelse] [datetime2](3) NULL,
  [SYS_VersionID] [bigint] NULL,
  [SYS_Checksum] AS (CONVERT([bigint],hashbytes('SHA2_256',concat([per_krl],[RC],[LSYS],[PER],[PRODATO],[SENR],[BRNR],[AMT],[KOM],[CPR],[CPRCNT],[MNUMMER],[LGRAD],[PENSGRAD],[ANSDATO],[TJSSTED],[TJSDATO],[AFD],[ANCDATO],[INST],[KNT],[ANSSTA],[LKL],[TRIN],[AFL],[BESK],[NMTIMER],[PERST],[PERSL],[AINDK],[ANSFORM],[PENSBID],[DISCOKODE],[DISCODATO],[JOBSTATUS],[JOBDATO],[FASTLOEN],[PENSLOEN],[FERIEDAGE],[FERIEGODT],[FERIELOEN],[LOKALSTK],[IMKNT],[CVR],[LOS],[LOSTEXT],[LEDERKODE],[PNUMMER],[fld_stat],[stk],[stk3tekstKrl],[stk5tekstKrl],[losknt],[fuldtid],[admgrp],[flexfaktor])),0)) PERSISTED,
  [SYS_ExecutionId] [bigint] NULL,
  [SYS_DataDeliveryBatchId_Create] [bigint] NULL
) 
on sys_batch_date_sc(SYS_BatchDate)
GO

CREATE UNIQUE CLUSTERED INDEX [IDX_CL_D190-10-1_DSAHIST_KRL_PersonaleLoen] On [D190-10-1].[DSAHIST_KRL_PersonaleLoen] (SYS_BatchDate, SYS_KommuneId, SYS_RowID) with (data_compression = page, STATISTICS_INCREMENTAL = ON) on sys_batch_date_sc(SYS_BatchDate);
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Indeholder KRLs behandlede personale- og lønoplysninger fra KMD og Silkeborg data.', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'per_krl';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'RC';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'LSYS';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'PER';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'PRODATO';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'SENR';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'BRNR';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'AMT';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'KOM';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'CPR';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'CPRCNT';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'MNUMMER';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'LGRAD';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'PENSGRAD';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'ANSDATO';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'TJSSTED';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'TJSDATO';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'AFD';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'ANCDATO';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'INST';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'KNT';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'ANSSTA';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'LKL';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'TRIN';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'AFL';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'BESK';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'NMTIMER';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'PERST';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'PERSL';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'AINDK';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'ANSFORM';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'PENSBID';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'DISCOKODE';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'DISCODATO';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'JOBSTATUS';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'JOBDATO';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'FASTLOEN';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'PENSLOEN';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'FERIEDAGE';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'FERIEGODT';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'FERIELOEN';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'LOKALSTK';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'IMKNT';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'CVR';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'LOS';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'LOSTEXT';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'LEDERKODE';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'PNUMMER';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'fld_stat';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'stk';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'stk3tekstKrl';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'stk5tekstKrl';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'losknt';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'fuldtid';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'admgrp';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'flexfaktor';
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'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@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'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@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'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@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'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'SYS_ExtractDate';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Dette er en teknisk Kolonne i FLIS. Indeholder ID for den primære snitflade, hvor data i rækken stammer fra', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'SYS_SourceFileID';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Dette er en teknisk Kolonne i FLIS. Indeholder den forretningsmæssige tidsangivelse for rækken. Denne bruges hvis data skal slettes med tidsangivelse', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'SYS_RettelserTidAngivelse';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Dette er en teknisk Kolonne i FLIS. Indeholder et versionsnummer for den pågældende række', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'SYS_VersionID';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'Dette er en teknisk Kolonne i FLIS. Indeholder cheksum info', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'SYS_Checksum';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'SysExecutionId', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'SYS_ExecutionId';
GO

EXEC sys.sp_addextendedproperty 
@name = N'MS_Description', 
@value = N'SysDataDeliveryBatchIdCreate', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen', 
@level2type = N'COLUMN', @level2name = N'SYS_DataDeliveryBatchId_Create';
GO

EXEC sys.sp_addextendedproperty 
@name = N'DataArea', 
@value = N'personale', 
@level0type = N'SCHEMA', @level0name = N'D190-10-1', 
@level1type = N'TABLE',  @level1name = N'DSAHIST_KRL_PersonaleLoen';
GO

