karatelung
Registered User.
- Local time
- Today, 09:07
- Joined
- Apr 5, 2001
- Messages
- 84
The SQL fragment below is the criteria for tblPlacement.DateOfAction. It filters records by ReferralID then returns only the Max(DateOfAction).
WHERE (([tblPlacement].DateOfAction)=(Select Max([DateOfAction]) FROM [tblPlacement] AS t_1 Where t_1.ReferralID = [tblPlacement].ReferralID))
This is great. The problem occurs with records that have a certain ReferralID with the same date. Say there are fifteen records where ReferralID = 3 and four of those have a Max(DateOFAction) = 4/1/2002. The query will return four records with ReferralID = 3. I want it to return only one record with ReferallID = 3. It doesn't matter which one.
Is there a way I can get the query to return records without the repeating ReferralID's?
Any information would be a huge help to me as I am stumped for the moment.
Thanks
WHERE (([tblPlacement].DateOfAction)=(Select Max([DateOfAction]) FROM [tblPlacement] AS t_1 Where t_1.ReferralID = [tblPlacement].ReferralID))
This is great. The problem occurs with records that have a certain ReferralID with the same date. Say there are fifteen records where ReferralID = 3 and four of those have a Max(DateOFAction) = 4/1/2002. The query will return four records with ReferralID = 3. I want it to return only one record with ReferallID = 3. It doesn't matter which one.
Is there a way I can get the query to return records without the repeating ReferralID's?
Any information would be a huge help to me as I am stumped for the moment.
Thanks