edited: nevermind, ADP finally helped me. there were other tables to factor in..... if you're curious:
select e.emplid, e.check_voucher_ind, j.empl_status, j.effdt
from ps_employment e, ps_job j
where e.emplid = j.emplid
and j.effdt =(select max(j2.effdt) from ps_job j2 where j.emplid = j2.emplid)
AND J.EFFDT = (SELECT MAX(JJ.EFFDT) FROM PS_JOB JJ WHERE JJ.EMPLID = J.EMPLID
AND JJ.EMPL_RCD_NBR = J.EMPL_RCD_NBR
AND JJ.EFFDT <= SYSDATE)
AND
J.EFFSEQ = (SELECT MAX(JJJ.EFFSEQ) FROM PS_JOB JJJ WHERE JJJ.EMPLID = J.EMPLID
AND JJJ.EMPL_RCD_NBR = J.EMPL_RCD_NBR
AND JJJ.EFFDT = J.EFFDT)
order by check_voucher_ind
__________________
Until the 20th century, reality was everything humans could touch, smell, see, and hear. Since the initial publication of the charted electromagnetic spectrum, humans have learned that what they can touch, smell, see, and hear is less than one millionth of reality
Last edited by mikec; 07-31-2007 at 08:07 AM..
|