IF OBJECT_ID('[DFDG].[DimAktiveringsforloeb]','U') IS NOT NULL
BEGIN
IF NOT EXISTS (SELECT 'T' FROM [DFDG].[DimAktiveringsforloeb] WHERE [DimAktiveringsforloebID] = -1 )
  INSERT INTO [DFDG].[DimAktiveringsforloeb]([DimAktiveringsforloebID]) VALUES (-1)
UPDATE [DFDG].[DimAktiveringsforloeb] SET
   [SYS_KommuneId] = 999
   WHERE [DimAktiveringsforloebID] = -1
END
GO
