/* #New 17.09.2014/J.Fes add for DS IR data */
SELECT IR.*
FROM
  dbo.Objects_tbl DS
  INNER JOIN dbo.Objects_Ir_Rel_tbl DS_IR_REL ON (DS.Id = DS_IR_REL.ObjectId)
  INNER JOIN dbo.Objects_tbl IR ON (DS_IR_REL.IrId = IR.Id)
WHERE
  IR.ObjectFromSiteID = '#SiteID#' AND
  IR.ObjectPuid IN ('#ObjectPuidList#') AND
  IR.ObjectClass = 'IR'
