/* Product Versions List */
SELECT pv.pv_id,
	   pv.pkg_version,
	   DECODE ( pv.pv_id,
	   		  	:OLD_PROD_ID, 'selected',
				NULL ) AS selected
  FROM PACKAGE_VERSIONS pv
 WHERE pv.pkg_id = :PKG_ID
   AND NVL( pv.V_EXT, 'LINK_NULL' ) = NVL ( :V_EXT, 'LINK_NULL')
ORDER BY UPPER(pv.pkg_version)   
   
   