/* Formatted on 2006/07/24 13:21 (Formatter Plus v4.8.6) */


/* All Base Configurations */

SELECT DISTINCT bec.prod_id,  pkg.pkg_name, pkg_version
           FROM boms bm,
                bom_contents bc,
                network_nodes nn,
                operating_systems os,
                os_base_env obe,
                base_env_contents bec,
                PACKAGES pkg,
                package_versions pv,
                base_env be,
                bos_types bt
          WHERE bm.bom_id = :bom_id
            AND bm.bom_id = bc.bom_id
            AND nn.node_id = bc.node_id
            --   AND nn.node_type_id IN (1)                 -- For Database Servers
            AND os.node_id = nn.node_id
            AND obe.os_id = os.os_id
            AND bec.base_env_id = obe.base_env_id
            AND bec.prod_id = pv.pv_id
            AND pkg.pkg_id = pv.pkg_id
            AND be.base_env_id = obe.base_env_id
            AND bt.bos_id = be.bos_id
ORDER BY UPPER(pkg.pkg_name), UPPER(pv.PKG_VERSION) 
--     AND bt.bos_id IN (2)                               -- Solaris only
--       AND os.not_xml IS NULL
--     AND bec.not_xml IS NULL