I am accessing data from our sales system to do some in depth analysis. This is done in a separate application. I export information from the system and upload into access in csv format. Part of this process is to lookup a vendor ID from a table of vendors and return a specific location that the vendor services.
My issue is that the location field in the vendor table is apt to change over time. This is a human data entry issue that is not supposed to happen but alas it does. A new record is supposed to be created for every change, but in practice that is not what happens all of the time. An example would be that when I go to my lookup table in January i see that vendor ABC services Dallas. When I look in February they service Houston. Houston is correct, but only for the period of February and forward until the value changes again. Likewise, Dallas is correct for January.
This would not be an issue if I was only at this data for each month, but I have to create this analysis year to date every month because we have no good cutoff in our sales system and invoices from prior periods can be added or changed.
What would be the best way to ensure that all transactions involving ABC for January show Dallas as the service location and February show Houston? My thought is to create a new vendor lookup table for each month and create a query that references the invoice month with the appropriate vendor table. Is this the best way to do this? Is there another way you would handle this issue? Below is an example of my vendor lookup table. Any input would be appreciated
Vendor ID Vendor Name Date Started Date Ended Servicing location Vendor Type 300000610 Bob Smith 1/1/2010 9/12/2014 ATL CF-DR/D10