IF OBJECT_ID('[Skole].[DimFagdisciplin]','U') IS NOT NULL
BEGIN
IF NOT EXISTS (SELECT 'T' FROM [Skole].[DimFagdisciplin] WHERE [DimFagdisciplinID] = -1 )
  INSERT INTO [Skole].[DimFagdisciplin]([DimFagdisciplinID]) VALUES (-1)
UPDATE [Skole].[DimFagdisciplin] SET
   [FagdisciplinKode] = -1
	,[FagdisciplinTekst] = 'Ukendt'
	,[FagsystemFagdisciplinKode] = 'Ukendt'
	,[FagsystemFagdisciplinTekst] = 'Ukendt'
	,[Produktionssystem] = 'Ukendt'
	,[SYS_KommuneId] = 999
   WHERE [DimFagdisciplinID] = -1
END
GO
