SELECT DISTINCT d.business_unit , a.emplid , a.strm FROM ps_stdnt_car_term a , ps_term_tbl b , PS_ACAD_PROG c , ps_home_campus_tbl d , ps_set_cntrl_rec e , ps_calc_cntl_term f WHERE a.tuit_calc_req = 'Y' AND b.institution = a.institution AND b.acad_career = a.acad_career AND b.strm = a.strm AND c.emplid = a.emplid AND c.acad_career = a.acad_career AND c.stdnt_car_nbr = a.stdnt_car_nbr AND c.effdt = ( SELECT MAX (cc.effdt) FROM PS_ACAD_PROG cc WHERE cc.emplid = c.emplid AND cc.acad_career = c.acad_career AND cc.stdnt_car_nbr = c.stdnt_car_nbr AND cc.effdt <= b.SSR_TRMAC_LAST_DT) AND c.effseq = ( SELECT MAX(ccc.effseq) FROM PS_ACAD_PROG ccc WHERE ccc.emplid = c.emplid AND ccc.acad_career = c.acad_career AND ccc.stdnt_car_nbr = c.stdnt_car_nbr AND ccc.effdt = c.effdt) AND d.institution = a.institution AND d.acad_prog = c.acad_prog AND d.effdt = ( SELECT MAX(dd.effdt) FROM ps_home_campus_tbl dd WHERE dd.institution = d.institution AND dd.acad_prog = d.acad_prog AND dd.effdt <= b.term_begin_dt) AND d.campus = c.campus AND e.setcntrlvalue = d.business_unit AND e.recname = 'CALC_CNTL_TERM' AND f.setid = e.setid AND f.acad_career = a.acad_career AND f.strm = a.strm AND f.auto_calc = 'Y'
|