/* ir.puid of ItemRev ren IrName -> ItemId + ItemPuid */
select
  i.puid As ItemPuid ,
  i.pitem_id As ItemId ,
  ir.puid As IrPuid,
  ir.pitem_revision_id As IrId
from
  infodba.PITEM i,
  infodba.PITEMREVISION ir
where
  i.puid = ir.ritems_tagu 
  AND upper(i.pitem_id) = upper(:i_pitem_id)
  AND upper(ir.pitem_revision_id) = upper(:ir_pitem_revision_id)
