|
-
Jan 14th, 2004, 10:38 PM
#1
Thread Starter
Hyperactive Member
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
Last edited by freewilly; Jan 18th, 2004 at 05:30 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|