empid emplrcd effdt effsq 101 #1 2/1/99 0 101 #1 3/1/13 1 101 #1 23/3/13 1 101 #1 22/6/13 2 102 #2 20/6/91 1
select a* from Ps_Job a where a.empid = '101' and a.emprcd ='#1' and a.effdt = (select max(a1.effdt) from Psjob1)