IF OBJECT_ID('[DREAM].[DimDreamVisitation]','U') IS NOT NULL
BEGIN
SET IDENTITY_INSERT [DREAM].[DimDreamVisitation] ON 
IF NOT EXISTS (SELECT 'T' FROM [DREAM].[DimDreamVisitation] WHERE [DimDreamVisitationID] = -1 )
  INSERT INTO [DREAM].[DimDreamVisitation]([DimDreamVisitationID]) VALUES (-1)
UPDATE [DREAM].[DimDreamVisitation] SET
   [VisitationsKode] = -1
	,[Visitation] = 'Ukendt'
	,[SYS_KommuneId] = 999
   WHERE [DimDreamVisitationID] = -1
SET IDENTITY_INSERT [DREAM].[DimDreamVisitation] OFF 
END
GO
