/* Base Env List */
SELECT be.base_env_id, 
	   be.base_env_name,
	   DECODE( osbe.OS_ID,
	   		   :OS_ID, 'selected',
			   NULL
	   		  ) AS selected,
	   bt.bos_icon 
  FROM BASE_ENV be,
  	   BOS_TYPES bt,
	   OS_BASE_ENV osbe
 WHERE be.BOS_ID = bt.BOS_ID 
   AND be.BOM_ID = :BOM_ID
   AND osbe.BASE_ENV_ID (+) = be.BASE_ENV_ID
   AND osbe.OS_ID (+) = :OS_ID
ORDER BY UPPER(be.BASE_ENV_NAME) 

