SELECT A.LEGENT, A.PROJECT, A.ACTCDE, A.HOURS, A.DAYDT, A.PNR,
B.KT040 AS NAME, C.TG148 as CC, A.systen, D.tg148 as HK, e.tg148 as
Mentor FROM CSPUSR.TIMESHP A, CSPDTA924.CS0KT B, CSPDTA924.CS0TG C,
cspdta924.cs0tg D, cspdta924.cs0tg e WHERE A.PNR=B.KT016 AND
A.PNR=C.TG016 AND C.TG147='C3' AND TFRDAT = (select max(tfrdat) from
cspusr.timeshp) AND C.TG148
BETWEEN &voncc AND &biscc AND A.LEGENT = &fa and d.tg147='HK' and
d.tg016=a.pnr and e.tg147='ME' and e.tg016=a.pnr
and d.tg148 between &vonkst and &biskst
and e.tg148 between &vonmentor and &bismentor
ORDER BY 1, 8, 6, 5, 3