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