m0nkey
MIS
- Mar 20, 2003
- 31
Ok....so i have been beating myself up and i have been crosseyed enough to put my head down and ask for help...it has defeated me and i need some guidance.
here goes:
i have two databases that i would like to update eachother when variables change from one to the other. right now i am going from lets say DB1 to DB2
the scenario is that i have a large number of accts and all are assigned to a single rep who is labeled as owner_id
owners change quite often in DB1 and i need DB2 to reflect that change.
DB2 is a phone dialer database that has this customer information. each owner (who is a sales rep) has a multitude of these lists.
a customer can be a part of multiple lists but a list can only belong to one owner.
here is a table in DB2 for:
LIST
-----
LIST_ID__list_type___file_number_______owner_id
10001____general_____abc123____________200
10002____follow______abc345____________200
10001____general_____abc345____________200
10003____general_____abc567____________300
10004____follow______abc890____________300
ok...so if i change the owner_id in DB1 i would like to update the owner_id in DB2. easy enough, but i also need to update the list_id. each list is owned by only one rep but a rep can own multiple lists. and a file can be a part of many lists but only one owner.
i need it to look like this if the owner of ABC345 changes from 200 to 300
LIST_ID__list_type_____file_number_______owner_id
10001____general_____abc123____________200
10002____follow______abc345____________300
10001____general_____abc345____________300
10003____general_____abc567____________300
10004____follow______abc890____________300
my question, and i applogize if this is so trivial, but how do i update the owner_id to have the correct list_id when the owners change and there are multiple lists? this seems so basic but its really kicking my a$$...
please guide me in the right direction...i can edit and add fields to either DB and do not have restrictions but i would like to maintain very little list management relationships if i could and not have to maintain a table manually evertime a list is created...
much thanks!!!
m
here goes:
i have two databases that i would like to update eachother when variables change from one to the other. right now i am going from lets say DB1 to DB2
the scenario is that i have a large number of accts and all are assigned to a single rep who is labeled as owner_id
owners change quite often in DB1 and i need DB2 to reflect that change.
DB2 is a phone dialer database that has this customer information. each owner (who is a sales rep) has a multitude of these lists.
a customer can be a part of multiple lists but a list can only belong to one owner.
here is a table in DB2 for:
LIST
-----
LIST_ID__list_type___file_number_______owner_id
10001____general_____abc123____________200
10002____follow______abc345____________200
10001____general_____abc345____________200
10003____general_____abc567____________300
10004____follow______abc890____________300
ok...so if i change the owner_id in DB1 i would like to update the owner_id in DB2. easy enough, but i also need to update the list_id. each list is owned by only one rep but a rep can own multiple lists. and a file can be a part of many lists but only one owner.
i need it to look like this if the owner of ABC345 changes from 200 to 300
LIST_ID__list_type_____file_number_______owner_id
10001____general_____abc123____________200
10002____follow______abc345____________300
10001____general_____abc345____________300
10003____general_____abc567____________300
10004____follow______abc890____________300
my question, and i applogize if this is so trivial, but how do i update the owner_id to have the correct list_id when the owners change and there are multiple lists? this seems so basic but its really kicking my a$$...
please guide me in the right direction...i can edit and add fields to either DB and do not have restrictions but i would like to maintain very little list management relationships if i could and not have to maintain a table manually evertime a list is created...
much thanks!!!
m