March 20, 200916 yr I need an efficient way to run calculations on multiple records in one table against corresponding multiple records in a second table. Let's see if I can explain. Table one has dated contracts for pieces of equipment. One piece of equipment can have multiple contracts: Equipment SN / Date Start / Rate / Date End. A second Table has the same equipment, a record date, and miles run. This table (2) can have multiple records for each single piece of equipment: Equipment SN / Date Run / Miles Run. What is the easiest way to evaluate table (2) Miles Run against information in table (1) whether equipment was on contract or not?
March 20, 200916 yr A relationship such as: Contracts::Equipment SN = Log::Equipment SN AND Contracts::Date Start ≤ Log::Date Run AND Contracts::Date End ≥ Log::Date Run will enable you to use the applicable Rate from Contracts in the Log table (assuming that's what you're looking for).
Create an account or sign in to comment