/* Products List */
SELECT osc.*,
	   pkg.pkg_name,
	   pv.pkg_version,
	   pd.IS_REJECTED,
	   pv.IS_PATCH,
	   pv.IS_OBSOLETE
  FROM PACKAGES pkg,
  	   PACKAGE_VERSIONS pv,
	   PRODUCT_DETAILS pd,
	   (
		SELECT osc.seq_num, osc.prod_id, osc.product_comments, osc.change_log_flag
		  FROM os_contents osc
		 WHERE osc.os_id = :OS_ID	   
	   ) osc
 WHERE pd.PROD_ID (+)= pv.PV_ID
   AND pv.pkg_id = pkg.pkg_id
   AND osc.PROD_ID = pv.pv_id	
   AND pv.IS_PATCH IS NULL
ORDER BY PKG_NAME