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