IF OBJECT_ID('[Skole].[DimKlasse]','U') IS NOT NULL
BEGIN
SET IDENTITY_INSERT [Skole].[DimKlasse] ON 
IF NOT EXISTS (SELECT 'T' FROM [Skole].[DimKlasse] WHERE [DimKlasseID] = -1 )
  INSERT INTO [Skole].[DimKlasse]([DimKlasseID]) VALUES (-1)
UPDATE [Skole].[DimKlasse] SET
   [SYS_KommuneId] = 999
   WHERE [DimKlasseID] = -1
SET IDENTITY_INSERT [Skole].[DimKlasse] OFF 
END
GO
