Someone suggested that I provide a sample table and the output I wish to
obtain.
Here they are...
For every entry in the tblCheck table, there is a corresponding log
stored under the DateCompleted field in the tblLog table. The linking
field is CheckID
[DateCompleted] [CheckID]
09/02/03 18
10/01/04 18
10/20/04 18
10/29/04 18
10/20/03 19
07/29/04 19
08/29/04 19
09/29/04 19
10/15/04 19
For each date corresponding to a particular check (i.e. for each
CheckID), I need to know how long it has taken since the last check.
I want the query to look like the following:
[DateComp] [DaysElapsed] [CheckID]
09/02/03 - 18
10/01/04 395.00 18
10/20/04 19.00 18
10/29/04 9.00 18
10/20/03 - 19
07/29/04 283.00 19
08/29/04 31.00 19
09/29/04 31.00 19
10/15/04 16.00 19
If you know of an SQL solution to this, then please provide the code. I
am new to database developing, and I don't know how to look through each
record using SQL. A VBA solution will be okay as well.
Thanks.
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!