/* Get all locations of a pkg_name, within a BOM */
SELECT :PROD_ID ||'_'|| os.os_id ||'_'|| pv.pv_id AS PROD_AT_OS,
	   pkg.pkg_name AS PROD_NAME,
	   pv.PKG_VERSION AS PROD_VERSION,
	   nn.NODE_NAME,
	   os.OS_NAME,
	   os.OS_ID,
	   pv.pv_id AS PROD_ID,
	   DECODE( pv.pv_id,
	   		   :PROD_ID, 0,
			   1 ) AS IS_DIFFERENT,
	   nt.NODE_ICON,
	   osc.PRODUCT_COMMENTS
  FROM BOM_CONTENTS bc,
	   OPERATING_SYSTEMS os,
	   NETWORK_NODES nn,
	   NODE_TYPES nt,
	   OS_CONTENTS osc,
	   PACKAGE_VERSIONS pv,
	   PACKAGES pkg
 WHERE bc.NODE_ID = nn.NODE_ID
   AND os.NODE_ID = nn.NODE_ID
   AND nn.NODE_TYPE_ID = nt.NODE_TYPE_ID
   AND osc.OS_ID = os.OS_ID
   AND osc.PROD_ID = pv.pv_id
   AND pv.pkg_id = pkg.pkg_id
   AND bc.BOM_ID = :BOM_ID
   AND pv.pkg_id IN ( SELECT pv.pkg_id  
   	   			 	  FROM PACKAGE_VERSIONS pv
					  WHERE pv.pv_id = :PROD_ID )