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