SELECT LST.HRS_LST_ID , PRFDTL.SRCH_SCORE , PRFDTL.JPM_PROFILE_ID , PROF.DESCR FROM PS_HRS_LIST LST , PS_JPM_PROFILE PROF , PS_HRS_LIST_PRFDTL PRFDTL , PS_HRS_SRCH_SAVED SAVED WHERE PRFDTL.HRS_LST_ID = LST.HRS_LST_ID AND PRFDTL.JPM_PROFILE_ID <> ' ' AND PROF.JPM_PROFILE_ID = PRFDTL.JPM_PROFILE_ID AND LST.HRS_LST_TYPE = 'SSPF' AND (LST.HRS_SAVE_UNTIL IS NULL OR LST.HRS_SAVE_UNTIL >=%CurrentDateIn) AND SAVED.SEARCH_NAME = %Substring(LST.HRS_SEARCH_NAME,1,20) AND ((SAVED.HRS_OWNER_ID = LST.HRS_OWNER_ID AND SAVED.HRS_SCH_ACCESS = 'V') OR SAVED.HRS_SCH_ACCESS = 'P') AND SAVED.HRS_SCH_TYPE = 'P'
|