D
Dazzed
I have a rather small table( 2204 records ) at the moment. We need to
generate a report that will spit out some prices that are totals based
on these records. So far so good and this query works too. Most of the
time....
SELECT tbl_a.addr, tbl_a.[Cust Name], tbl_a.PN, tbl_a.[Unit
Description], SUM(tbl_a.[Number of Units]) AS TotalUnits,
SUM(tbl_a.TotalPrice) AS TotalPriceOfUnits
FROM tbl_a
GROUP BY tbl_a.addr, tbl_a.[Cust Name], tbl_a.PN, tbl_a.[Unit
Description];
As the data has been entered we noticed that only in a few instances
have records not been grouped and as such summed.
Ultimatly what I need to have happen is the report spit out a list of
each towns customers listed with any records for them grouped and
summed up in a nice neat package what we are getting though is this and
then a few customers later another listing for the same customer again.
I have tried to recreate this behavior in another db but for the life
of me I dont know how its happening or why!
Would appreciate any help you folks out there could offer.
Thanks
generate a report that will spit out some prices that are totals based
on these records. So far so good and this query works too. Most of the
time....
SELECT tbl_a.addr, tbl_a.[Cust Name], tbl_a.PN, tbl_a.[Unit
Description], SUM(tbl_a.[Number of Units]) AS TotalUnits,
SUM(tbl_a.TotalPrice) AS TotalPriceOfUnits
FROM tbl_a
GROUP BY tbl_a.addr, tbl_a.[Cust Name], tbl_a.PN, tbl_a.[Unit
Description];
As the data has been entered we noticed that only in a few instances
have records not been grouped and as such summed.
Ultimatly what I need to have happen is the report spit out a list of
each towns customers listed with any records for them grouped and
summed up in a nice neat package what we are getting though is this and
then a few customers later another listing for the same customer again.
I have tried to recreate this behavior in another db but for the life
of me I dont know how its happening or why!
Would appreciate any help you folks out there could offer.
Thanks