IF OBJECT_ID('[DFDG].[DimVisitation]','U') IS NOT NULL
BEGIN
IF NOT EXISTS (SELECT 'T' FROM [DFDG].[DimVisitation] WHERE [DimVisitationID] = -1 )
  INSERT INTO [DFDG].[DimVisitation]([DimVisitationID]) VALUES (-1)
UPDATE [DFDG].[DimVisitation] SET
   [SYS_KommuneId] = 999
   WHERE [DimVisitationID] = -1
END
GO
