Jacob Hilderbrand
07-06-2006, 09:04 AM
Hi
I am having trouble with a query and hopefully someone can help me out.
Given the following setup:
Table: "Table 3"
Fields: "ID", "A", "B", "C", "TransactionDate"
There can be several of the same ID listed.
What I want to do is this. For each ID, list only one record (and show all 5 fields). If there are multiple, then list the record from the latest TransactionDate.
Now, the tricky part. There can be multiple TransactionDates, normally I just want the latest, but if there are several records for the latest date, I want to list them all.
So if ID "ID1" has the following records for dates:
7/4/06
7/5/06
7/6/06
I want the last one, but if these are the records:
7/4/06
7/6/06
7/6/06
7/6/06
I want the last 3 records.
Thanks
Jake
I am having trouble with a query and hopefully someone can help me out.
Given the following setup:
Table: "Table 3"
Fields: "ID", "A", "B", "C", "TransactionDate"
There can be several of the same ID listed.
What I want to do is this. For each ID, list only one record (and show all 5 fields). If there are multiple, then list the record from the latest TransactionDate.
Now, the tricky part. There can be multiple TransactionDates, normally I just want the latest, but if there are several records for the latest date, I want to list them all.
So if ID "ID1" has the following records for dates:
7/4/06
7/5/06
7/6/06
I want the last one, but if these are the records:
7/4/06
7/6/06
7/6/06
7/6/06
I want the last 3 records.
Thanks
Jake