/* Project List */
SELECT dmp.PROJ_ID,
	   dmp.PROJ_NAME,
	   dmp.RM_PROJECTS_FK,
	   proj.PROJ_NAME AS RM_PROJECT_NAME,
	   dmp.IS_HIDDEN,
	   dmp.IS_DOWNLOAD,
           pbom.BOM_ID,
           bn.BOM_NAME,
           bms.RTAG_ID_FK,
           br.BRANCH_NAME,
           pbom.STATE_ID,
           st.STATE_NAME,
           bms.BOM_VERSION ||'.'|| bms.BOM_LIFECYCLE AS VERSION
  FROM DM_PROJECTS dmp,
  	   PROJECTS proj,
           PRODUCTION_BOM pbom,
           BOMS bms,
           BOM_NAMES bn,
           BRANCHES br,
           STATES st
 WHERE dmp.RM_PROJECTS_FK = proj.PROJ_ID (+)
       AND dmp.PROJ_NAME LIKE ('%PRODUCTION%')
       AND pbom.PROJ_ID = dmp.PROJ_ID
       AND bms.BOM_ID = pbom.BOM_ID
       AND bn.BOM_NAME_ID = bms.BOM_NAME_ID
       AND br.BRANCH_ID = bms.RTAG_ID_FK
       AND st.STATE_ID = pbom.STATE_ID
       AND dmp.PROJ_ID = :PROJ_ID
 ORDER BY UPPER(dmp.PROJ_NAME)
  