/* Description: Ermittlung aller IR's die neuer sind als das angegebene Datum
   -- siehe auch ..\OracleSQL\IRs_by_Date.SQL */
SELECT i.puid          AS ItemPuid,
  i.pitem_id           AS ItemName,
  ir.puid              AS IrPuid,
  ir.pitem_revision_id AS IrRev,
  paoIr.plast_mod_date AS IrLastModDate,
  s.psite_id           AS IrOwningSite_TCE_pSite_ID
FROM dbo.PITEM i
LEFT JOIN dbo.PITEMREVISION ir on (i.puid = ir.ritems_tagu)
LEFT JOIN dbo.PPOM_OBJECT o on (ir.puid = o.puid)
LEFT JOIN dbo.PPOM_IMC s ON (o.rowning_siteu = s.puid)
LEFT JOIN dbo.PPOM_APPLICATION_OBJECT paoIr ON (ir.puid = paoIr.puid)
WHERE paoIr.plast_mod_date >= @para_plast_mod_date
-- entnommen 24.01.2012 18:53 da in JS verlegt
-- Order by
--   paoIr.plast_mod_date Asc
