/* Desc: Get Attr of Obj:Item Ir
   19.08.13 New */
SELECT
  paoIr.pcreation_date     AS CreateDate,
  paoIr.plast_mod_date     AS LastModDate,
  puIrOwningUser.puser_id  AS OwningUser,
  puIrLastModUser.puser_id AS LastModUser,
  pgIr.pname               AS OwningGroup,
 -- ? s.pname                  AS OwningSite,
  s.psite_id               AS OwningSite_TC_pSite_ID,
  wso.pobject_desc         AS Description,
  wso.pobject_name         AS Name2,
  wso.pobject_type         AS Type
FROM
  infodba.PPOM_APPLICATION_OBJECT paoIr
  INNER JOIN infodba.PPOM_USER puIrOwningUser ON (paoIr.rowning_useru = puIrOwningUser.puid)
  INNER JOIN infodba.PPOM_USER puIrLastModUser ON (paoIr.rlast_mod_useru = puIrLastModUser.puid)
  INNER JOIN infodba.PPOM_GROUP pgIr ON (paoIr.rowning_groupu = pgIr.puid)
  INNER JOIN infodba.PPOM_OBJECT o ON (paoIr.puid = o.puid)
  INNER JOIN infodba.PWORKSPACEOBJECT wso ON (paoIr.puid = wso.puid)
  LEFT OUTER JOIN infodba.PPOM_IMC s ON (o.rowning_siteu = s.puid)
where
  paoIr.puid = :para_puid
