SELECT DISTINCT t.emplid , t.institution , i.descr FROM PS_SSR_APTSY_TXN_V t ,ps_institution_tbl i WHERE i.institution = t.institution AND i.effdt = ( SELECT MAX(i2.effdt) FROM ps_institution_tbl i2 WHERE i2.institution = i.institution AND i2.effdt <= %CurrentDateIn) AND i.eff_status = 'A' AND NOT EXISTS ( SELECT 'X' FROM ps_ssr_apt_enrl b WHERE t.emplid = b.emplid AND t.institution = b.institution AND t.ssr_apt_instance = b.ssr_apt_instance AND t.acad_career = b.src_career AND t.strm = b.src_term AND t.class_nbr = b.class_nbr )
|