Subversion Repositories DevTools

Rev

Rev 5925 | Rev 5946 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

-- UsedByPackageSummary.sql
-- Determine packages that depend on a specified package-version
-- Provide the package id, name and count of package-versions
select pkg.pkg_name, pkg.pkg_id, count(ppv.pv_id) AS count
  from PACKAGE_DEPENDENCIES dep,
  package_versions pv,
  package_versions ppv,
  packages pkg
  Where dep.DPV_ID = pv.pv_id
  AND dep.PV_ID = ppv.pv_id
  AND pv.PKG_ID in ( select pkg_id from package_versions where pv_id = :PV_ID )
  AND NVL(pv.v_ext,'LINK') in ( select NVL(v_ext,'LINK') from package_versions where pv_id = :PV_ID )
  AND pkg.pkg_id = ppv.pkg_id
  AND (pv.pv_id = :PV_ID OR :MATCH = 0)
  GROUP BY pkg.pkg_name, pkg.pkg_id
  ORDER BY UPPER(pkg.pkg_name)