/* erm. ob IR eine BOM View besitzt
  Original Stand 27.07.2007 lc: 12.03.13/J.Fes */
select
  ps.puid
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
  upper(bvt.pname) = 'VIEW'
  and ps.puid = :para_puid
