Results 1 to 6 of 6

Thread: Record grouping problem [Resolved]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2000
    Location
    Sydney Australia
    Posts
    476

    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
  •  



Click Here to Expand Forum to Full Width