/* #New 24.05.2017/J.Fes+S.Gueth add for IR Item data */
SELECT I.*
FROM
  dbo.Objects_tbl IR
  INNER JOIN dbo.Objects_Ir_Rel_tbl IR_I_REL ON (IR.Id = IR_I_REL.ObjectId)
  INNER JOIN dbo.Objects_tbl I ON (IR_I_REL.IrId = I.Id)
WHERE
  IR.ObjectFromSiteID = '#SiteID#' AND
  IR.ObjectClass = 'IR' And
  IR.ObjectPuid IN ('#ObjectPuidList#') AND
  I.ObjectClass = 'I'
