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!

Choose record with closest time

Status
Not open for further replies.

StephHansen

Programmer
Dec 26, 2001
87
IN
I have two tables that do not have a common id to link them. I am trying to create a report to show how long it takes between when a truck arrives and when the package it delivered is processed.

Table 1: TruckHistory shows when a truck arrives
Table 2: PackageHistory details what happens when a package is received

TruckHistory.TruckArrivalTime shows when a truck arrived
PackageHistory.startTime shows when the package begins processing

I need to find the max time of truck arrival that does not exceed the start of the package processing.
similar to
Max(truck.truckarrivaltime)<=packageHistory.startTime

How would I do this within my report?

Stephanie
 
I have two tables that do not have a common id to link them. I am trying to create a report to show how long it takes between when a truck arrives and when the package it delivered is processed.

Table 1: TruckHistory shows when a truck arrives
Table 2: PackageHistory details what happens when a package is received



Question: How do you know you have the correct truck for the package?? or is this only a one-truck company?

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top