sum(iif(mode="L",1,0)) to bagsLC sum(iif(mode="L",weight,0)) to bagsLSBut when I add your codes in my SQL as
SELECT MONTH(date) as nmonth,; CMONTH(date) as cmonth,; YEAR(date) as nyear,; sum(weight) as weight; SUM(iif(mode="L",1,0)) as bagsLC ; sum(iif(mode="L",weight,0)) as bagsLS; from avlbook; GROUP BY nmonth,nyear ; ORDER BY nyear,nmonth; INTO CURSOR TempThen it show following error message