Update a query by adding only some records together.

  • Thread starter Thread starter Sheryl
  • Start date Start date
S

Sheryl

I need to take a table/query that looks like:

A 1
A 2
B 1
B 3

and turn it into:

A 3
B 4

Basically, I need to sum up some fields according to
another field. i.e. If the data in field one matches,
sum field two. I do not know what the data in field one
is... I just know it needs to match itself in order to
combine other fields.

Please help!!!

Sheryl
 
The syntax should be along the lines of
SELECT columnA, Sum(ColumnB)
FROM YourTable
GROUP BY columnA

You will have to change YourTable, columnA and columnB to
suit your app.

Hope This Helps
Gerald Stanley MCSD
 
Thanks... I ended up figuring it out... I had one field
as a group by that had unique values messing it all up.
I'm an idiot:)
 
Back
Top