-- erm. ob IR eine BOM View hat lc: 12.03.13/J.Fes
-- #LUp: S.Gueth 09.05.2018, added Name bvr.puid BOMViewPuid
select
  ps.puid,
  bvr.puid AS BOMViewPuid
from
  infodba.PSTRUCTURE_REVISIONS ps
  LEFT JOIN infodba.PPSBOMVIEWREVISION bvr ON (ps.pvalu_0 = bvr.puid)
  LEFT JOIN infodba.PPSBOMVIEW bv ON (bvr.rbom_viewu = bv.puid)
  LEFT JOIN infodba.PPSVIEWTYPE bvt ON (bvt.puid = bv.rview_typeu)
where
 ps.puid = :para_puid
 AND upper(bvt.pname) In ('VIEW','CATIA_MULTI_MODEL','CATIA')
