I've gotten help on a similar query from SantaMufasa before on this forum. For some reason I seem otherwise inept to change that query to fit what I want to do now.
So, I've got a table I want to update(indirect_customer_copy). It has DEA and COT, I want to update the unknown COT based on DEA. The next table(indirect_sales) has DEA and agreement_id. The next table(Agreement_id_to_cot) has agreement_id and COT. So I'd like it to pull a list of DEAs that are unknown, then figure out each agreement_id. The problem is a DEA may have more than one agreement_id, so it would take the multiple agreement_ids and figure out the COT from Agreement_id_to_cot table and then use COT_importance, a table that has COT and its importance(1-20, 1 being the best), to choose the COT.
Here's the previous thread.
Thanks for your help,
Chris
So, I've got a table I want to update(indirect_customer_copy). It has DEA and COT, I want to update the unknown COT based on DEA. The next table(indirect_sales) has DEA and agreement_id. The next table(Agreement_id_to_cot) has agreement_id and COT. So I'd like it to pull a list of DEAs that are unknown, then figure out each agreement_id. The problem is a DEA may have more than one agreement_id, so it would take the multiple agreement_ids and figure out the COT from Agreement_id_to_cot table and then use COT_importance, a table that has COT and its importance(1-20, 1 being the best), to choose the COT.
Here's the previous thread.
Thanks for your help,
Chris