hi
Can someone help me writing this query. I been trying since last night no success.
strSQL = "SELECT Group_codes.Gro up_ID, Group_codes.Nam e, SUM(inv_detail. price * inv_detail.quan tity) AS price1 FROM product_codes, catagory_codes, inv_detail, inv_total, Group_codes WHERE group_codes.gro up_id = catagory_codes. group_id AND product_codes.c at_code = catagory_codes. cat_code AND product_codes.I tem_code = inv_detail.item _code AND inv_detail.tran _id = inv_total.tran_ id and inv_total.date between #" & strTo & "# and #" & strFrom & "#GROUP BY Group_codes.Gro up_ID, Group_codes.Nam e"
I have four group codes I want to get nettotals of all purchases against these code. I am using above written query.
this gives me following out put
Group ID Name Price(i.e sum of all item which belong to one group catagory)
1 **** total of item having group id 1
2 *** for grp code 2
3 *** for grp code 3
4
datareport look good and isplays correct information. How I can get GRANDTOTAL(grp 1 2 3 and 4)
Can someone help me writing this query. I been trying since last night no success.
strSQL = "SELECT Group_codes.Gro up_ID, Group_codes.Nam e, SUM(inv_detail. price * inv_detail.quan tity) AS price1 FROM product_codes, catagory_codes, inv_detail, inv_total, Group_codes WHERE group_codes.gro up_id = catagory_codes. group_id AND product_codes.c at_code = catagory_codes. cat_code AND product_codes.I tem_code = inv_detail.item _code AND inv_detail.tran _id = inv_total.tran_ id and inv_total.date between #" & strTo & "# and #" & strFrom & "#GROUP BY Group_codes.Gro up_ID, Group_codes.Nam e"
I have four group codes I want to get nettotals of all purchases against these code. I am using above written query.
this gives me following out put
Group ID Name Price(i.e sum of all item which belong to one group catagory)
1 **** total of item having group id 1
2 *** for grp code 2
3 *** for grp code 3
4
datareport look good and isplays correct information. How I can get GRANDTOTAL(grp 1 2 3 and 4)
Comment