Record grouping problem [Resolved]
Hi team
I have a table that holds contract details for travel agents and customers. The table contains details of expired contract as well as current contract. I can tell which contract is current by looking at the ContractExpireDate.
I get the latest contract by grouping on the agent ID and customerID and get the Max(ContractExpireDate).
This works fine. The problem is that I also want to get the ContactID of the Max(ContractExpireDate) record. Max(ContactID) is not guaranteed to be from the same record as Max(ContractExpireDate).
So my question is, can I do the grouping so that the ContractID I get back is guaranteed to be from the same record as the ContractExpireDate?
Thanks
FW