Print '----------------------------------------------------'
Print ' Script for JobMgr:'
Print ' FirstRevision: V2.0.0   22.03.2006'
Print ' CurrRevision : V2.1.1   11.02.2007'
Print ' Autor        : J.Feuerstein'
Print ' '
Print '----------------------------------------------------'
GO

use [#DB_N#]

Update dbo.Objects_tbl
set Objects_tbl.ObjectSelectByMarker = 'Import.Update'
where dbo.Objects_tbl.ObjectClass = 'IR' and
dbo.Objects_tbl.ObjectFromSiteID  + dbo.Objects_tbl.ObjectName in (
SELECT DISTINCT
  dbo.DS_with_Irs_View.ObjectFromSiteID  + dbo.DS_with_Irs_View.IrName As [SiteIrName]
FROM
  dbo.DS_with_Irs_View
WHERE
  dbo.DS_with_Irs_View.IrName NOT IN
  (SELECT dbo.DS_with_Irs_View.IrName
  FROM dbo.DS_with_Irs_View
  WHERE dbo.DS_with_Irs_View.ObjectType = 'UGMASTER' GROUP BY dbo.DS_with_Irs_View.IrName)
)


GO

Print ''
Print '---------------------------------------------------------'
Print ' \01-BinServer.Custom\_DbMaintain.sql\      '
Print ' .\JobMg_90_Mark_ImportUpdate_HavingNoUgMaster.sql Script executed'
Print '---------------------------------------------------------'
GO
