IF OBJECT_ID('[Generel].[DimKøn]','U') IS NOT NULL
BEGIN
IF NOT EXISTS (SELECT 'T' FROM [Generel].[DimKøn] WHERE [DimKønID] = -1 )
  INSERT INTO [Generel].[DimKøn]([DimKønID]) VALUES (-1)
UPDATE [Generel].[DimKøn] SET
   [SYS_KommuneId] = 999
   WHERE [DimKønID] = -1
END
GO
