SELECT
 paoObj.puid AS ObjectPUID,
 paoObj.pcreation_date AS CreateDate,
 paoObj.plast_mod_date AS LastModDate,
 NULL AS LastSavDate,
 OwningUser.puser_id AS OwningUser,
 LastModUser.puser_id AS LastModUser,
 OwingGroup.pname AS OwningGroup,
 OwingGroup.puid AS OwningGroupPuid,
 s.psite_id AS OwningSite_TC_pSite_ID,
 wso.pobject_desc AS Description,
 wso.pobject_name AS Name2,
 wso.pobject_type AS Type,
 wso.pdate_released AS ReleasedDateWSO,
 rs.pname As ObjReleaseState,
 rs.pdate_released As ObjReleaseDate,
 s.puid
FROM
 infodba.PPOM_APPLICATION_OBJECT paoObj
 INNER JOIN infodba.PPOM_USER OwningUser ON (paoObj.rowning_useru = OwningUser.puid)
 INNER JOIN infodba.PPOM_USER LastModUser ON (paoObj.rlast_mod_useru = LastModUser.puid)
 INNER JOIN infodba.PPOM_GROUP OwingGroup ON (paoObj.rowning_groupu = OwingGroup.puid)
 INNER JOIN infodba.PPOM_OBJECT o ON (paoObj.puid = o.puid)
 INNER JOIN infodba.PWORKSPACEOBJECT wso ON (paoObj.puid = wso.puid)
 LEFT JOIN infodba.PPOM_IMC s ON (o.rowning_siteu = s.puid)
 LEFT JOIN (SELECT rsltbl.puid, rsltbl.pvalu_0
            FROM infodba.PRELEASE_STATUS_LIST rsltbl
			WHERE rsltbl.pseq = (SELECT MAX(rsl2.pseq) FROM infodba.PRELEASE_STATUS_LIST rsl2 WHERE rsl2.puid = rsltbl.puid)
			) rsl ON rsl.puid = paoObj.puid
 LEFT JOIN infodba.PRELEASESTATUS rs ON (rs.puid = rsl.pvalu_0)
where
 paoObj.puid in (#para_puidList#)
