Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sum one field twice, each time for different criteria

Status
Not open for further replies.

MontyBurns

Programmer
Oct 3, 2001
99
GB
Hi,

Have a feelin i'm being a bit thick 2day, as this seems like it should be easy...

Given the following table (simplified):

tblTopics
-----------
TopicId Autonum (key)
MainGroup Text(50)
InReview Yes/No
Completed Yes/No
Weighting Integer(single)

I need a report which will, for each MainGroup (Distinct), display the Sum of Weighting for both records which are InReview and Completed.

I.e.
MainGroup Sum of InReview Sum of Completed
----------------------------------------------------------
Banking 13 15
Derivatives 5 32
...
...
etc.

I assume i'll need to do 2 separate queries and then do a query on these two to bring the two results together, but I just can't seem to figure it out.

Any takers?
Thanks,
Burns
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top