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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query calculation column

Status
Not open for further replies.

bluedollar

Programmer
Jul 24, 2003
174
GB
I have a select query with a number of COUNT columns. What I need is another column that performs calculations on the results of these columns.

For example I have a done1 column that is counted and a done2 column which is counted, what I need is another column (calc) in the query that produces a result subject to the following calculation:

calc column = COUNT of done1 - COUNT of done2

A worked example is shown below:

done1 done2 calc

2 1 1
0 1 -1
2 0 2

Whats the best way of doing this? Any help would be greatly appreciated.

Thanks

Dan
 
Totally disregard the above question, found how to do it on the net, I was being stupid.

Thanks

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top