G
Guest
Hi
Below query suppose to show result sum of Gross, Discount & Net group by date and sname but it does not. The should be only only one line only for a date for a sname. Where is my mistake. Pls advise
SELECT staff.sname, TNLINES.date, TNLINES.docket, Sum([Qty]*[fileprice]) AS Gross, Sum([Qty]*[disc_valpc]) AS Discount, Sum(([Qty]*[fileprice])-([Qty]*[disc_valpc])) AS Ne
FROM (staff INNER JOIN tnheader ON staff.staff = tnheader.staff) INNER JOIN TNLINES ON tnheader.docket = TNLINES.docke
GROUP BY staff.sname, TNLINES.date, TNLINES.docket, TNLINES.sk
HAVING (((TNLINES.sku)<>"100000000000"))
Mark
Below query suppose to show result sum of Gross, Discount & Net group by date and sname but it does not. The should be only only one line only for a date for a sname. Where is my mistake. Pls advise
SELECT staff.sname, TNLINES.date, TNLINES.docket, Sum([Qty]*[fileprice]) AS Gross, Sum([Qty]*[disc_valpc]) AS Discount, Sum(([Qty]*[fileprice])-([Qty]*[disc_valpc])) AS Ne
FROM (staff INNER JOIN tnheader ON staff.staff = tnheader.staff) INNER JOIN TNLINES ON tnheader.docket = TNLINES.docke
GROUP BY staff.sname, TNLINES.date, TNLINES.docket, TNLINES.sk
HAVING (((TNLINES.sku)<>"100000000000"))
Mark