/* All Products */
SELECT DISTINCT 
       osc.PROD_ID,
	   pkg.pkg_name,
	   pv.pkg_version,
	   pd.IS_REJECTED,
	   os.OS_ID,
	   os.OS_NAME,
	   nn.NODE_NAME,
	   nn.node_id,
	   pv.IS_PATCH, pv.IS_OBSOLETE,
	   osc.SEQ_NUM
  FROM    deployment_manager.bom_contents bc, 
   	 deployment_manager.operating_systems os, 
      	 deployment_manager.os_contents osc,
	 PACKAGES pkg,
  	 PACKAGE_VERSIONS pv,
	 deployment_manager.PRODUCT_DETAILS pd,
	 deployment_manager.NETWORK_NODES nn
 WHERE osc.os_id = os.os_id 
   AND os.node_id = bc.node_id
   AND bc.bom_id = :BOM_ID
   AND pd.PROD_ID (+) = osc.PROD_ID
   AND pv.pkg_id = pkg.pkg_id
   AND osc.prod_id = pv.pv_id 
   AND nn.NODE_ID = os.NODE_ID
 ORDER BY UPPER(nn.NODE_NAME), UPPER(os.OS_NAME), osc.SEQ_NUM