-- #LUp:02.01.16/J.Fes last RelStat/Date for puid
-- #LUp.02.05.19/J.Fes update to JOIN
select
 s.pname As ObjReleaseState,
 s.pdate_released As ObjReleaseDate
from
 infodba.PRELEASE_STATUS_LIST sl
 LEFT JOIN infodba.PRELEASESTATUS s ON (s.puid  = sl.pvalu_0)
where
 sl.puid = :para_puid and
 sl.pseq =
 (select Max(sl.pseq) AS MaxWert
 from
  infodba.PRELEASE_STATUS_LIST sl
  LEFT JOIN infodba.PRELEASESTATUS s ON (s.puid  = sl.pvalu_0)
 where
  sl.puid = :para_puid
 )
