SELECT A.INSTITUTION , A.EMPLID , B.SCC_BRINCD_NLD , A.ADM_APPL_NBR FROM PS_ADM_APPL_PROG A , PS_SCC_HM_CAMP_NLD B , PS_SSR_EA_ADMS_NLD SETUP WHERE A.INSTITUTION = B.INSTITUTION AND A.ACAD_PROG = B.ACAD_PROG AND A.CAMPUS = B.CAMPUS AND %EffdtCheck(SCC_HM_CAMP_NLD B_ED, B, A.EFFDT) AND A.EFFDT = ( SELECT MAX(A_ED.EFFDT) FROM PS_ADM_APPL_PROG A_ED WHERE A.EMPLID = A_ED.EMPLID AND A.ACAD_CAREER = A_ED.ACAD_CAREER AND A.STDNT_CAR_NBR = A_ED.STDNT_CAR_NBR AND A.ADM_APPL_NBR =A_ED.ADM_APPL_NBR AND A.APPL_PROG_NBR = A_ED.APPL_PROG_NBR ) AND A.EFFSEQ= ( SELECT MAX(A_ES.EFFSEQ) FROM PS_ADM_APPL_PROG A_ES WHERE A.EMPLID = A_ES.EMPLID AND A.ACAD_CAREER = A_ES.ACAD_CAREER AND A.STDNT_CAR_NBR = A_ES.STDNT_CAR_NBR AND A.ADM_APPL_NBR =A_ES.ADM_APPL_NBR AND A.APPL_PROG_NBR = A_ES.APPL_PROG_NBR AND A.EFFDT = A_ES.EFFDT) AND SETUP.INSTITUTION = A.INSTITUTION AND SETUP.SCC_BRINCD_NLD = B.SCC_BRINCD_NLD AND %EffdtCheck(SSR_EA_ADMS_NLD SETUP_ED, SETUP, A.EFFDT) AND A.ADMIT_TERM >= SETUP.ADMIT_TERM AND A.ACAD_CAREER IN ( SELECT DISTINCT XLSE.ACAD_CAREER FROM PS_SSR_BR_XLSE_NLD XLSE WHERE XLSE.INSTITUTION = A.INSTITUTION AND XLSE.SCC_BRINCD_NLD = B.SCC_BRINCD_NLD AND %EffdtCheck(SSR_BR_XLSE_NLD XLSE_ED, XLSE, A.EFFDT) )
|