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

Subtraction / Difference ?? 1

Status
Not open for further replies.

TCar

Technical User
Oct 2, 2001
2
US
I have a table with several fields.
Some are 1. Equipment ID, 2. Month End Date, 3. Meter Hour Reading.

I got a query that pulls up the records with the above fields for two consecutive months.

My queston is "How can I get the calculated delta Meter Hours of each equipment in the query or a report?"

i.e.
CAT D8 Dozer 30June05 1650 Hours
CAT D8 Dozer 31July05 1800 Hours
Delta Month Meter Hours = 150 Hours
 
The easiest way is to have three queries. One query pulls out all of the data for one month. The second pulls data for the second month. Finally the third query contains both of the first two queries joined on the ID. Now you can just do your delta calculation.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top