SET ENGINEBEHAVIOR 70 SELECT lcode,sec,descr,examcode, sum(tobt) as tobtt,; SUM(tmax) as tmaxt; FROM Examtran; WHERE examcode=thisform.code.value .and. scode>=thisform.shiftfm.value .and. scode<=thisform.shiftto.value; GROUP BY lcode,sec; INTO CURSOR tyu brows SELECT lcode,sec,descr,examcode,tobtt,tmaxt,; TRANSFORM((tobtt/tmaxt)*100,"##.##") AS PERCENTAGE; FROM tyu; WHERE examcode=thisform.code.value .and. scode>=thisform.shiftfm.value .and. scode<=thisform.shiftto.value; GROUP BY lcode,sec; INTO CURSOR ppp SELECT ppp browsSorry i am using vfp data not using ms sql server