I have a table named AGCOMCREV (25,129 records). It contains agent commission contract records with things like agent hierarchy (if there are other agents making an "override" commission on a product's sale, contract effective date, and specific commission percentages for each product sold and to whom it will be paid.
My problem is this: for every AgentCode in the table, I need to get their commissions grouped by ContractEffectiveDate. The goal is to reconstruct the contracts and any hierarchies for a big conversion project underway. The info was in a flat text file and I've cleaned it up in Excel before loading the info into Access.
I also need to be able to pinpoint every hierarchy in the table. For example, I need to show that AgentCode "A31F" worked underneath "A30N" for the contract effective November 15, 1997 and each agent earned "X" percent for each product type sold. Agt1 is always equal to AgentCode so you know they are the selling agent. "A30N" will have their own entry that should NOT show "A31F" because they are atop the hierarchy. There are other cases where 3 or more agents are involved in the same hierarchy.
Please tell me if this needs to be split up into smaller tasks because I don't want to overly complicate this if it doesn't need to be so. Thanks!