IF OBJECT_ID('[Skole].[DimInstitutionstype]','U') IS NOT NULL
BEGIN
IF NOT EXISTS (SELECT 'T' FROM [Skole].[DimInstitutionstype] WHERE [DimInstitutionstypeID] = -1 )
  INSERT INTO [Skole].[DimInstitutionstype]([DimInstitutionstypeID]) VALUES (-1)
UPDATE [Skole].[DimInstitutionstype] SET
   [InstitutionstypeKode] = -1
	,[InstitutionstypeTekst] = 'Ukendt'
	,[SYS_KommuneId] = 999
   WHERE [DimInstitutionstypeID] = -1
END
GO
