M
michael
Hi. Any help with this would be great! I have a query,
qryShipments, that shows shipments of product like so:
Territory SAPNumber InvoiceDate Amount
Sometimes accounts move from one Territory to another.
When that happens, my company's SAP database changes the
entire historical record so that the accounts' territory
change from the old territory to the new one. This makes
it hard for me to make accurate historical reports. What
I'd like to do is keep a table, tblAccountTransfers, that
lists all account transfers like so:
SAPNumber
TerritoryOld
TerritoryNew
DateBeganInOldTerritory
DateEndedInOldTerritory
Then I'd make an SQL query that says if the SAPNumber in
qryShipments is the same as in tblAccountTransfers, and
the InvoiceDate is between DateBeganInOldTerritory and
DateEndedInOldTerritory, then use TerritoryOld from
tblAccountTransfers. Otherwise, use Territory from
tblShipments. Any thoughts on how I can do this?
qryShipments, that shows shipments of product like so:
Territory SAPNumber InvoiceDate Amount
Sometimes accounts move from one Territory to another.
When that happens, my company's SAP database changes the
entire historical record so that the accounts' territory
change from the old territory to the new one. This makes
it hard for me to make accurate historical reports. What
I'd like to do is keep a table, tblAccountTransfers, that
lists all account transfers like so:
SAPNumber
TerritoryOld
TerritoryNew
DateBeganInOldTerritory
DateEndedInOldTerritory
Then I'd make an SQL query that says if the SAPNumber in
qryShipments is the same as in tblAccountTransfers, and
the InvoiceDate is between DateBeganInOldTerritory and
DateEndedInOldTerritory, then use TerritoryOld from
tblAccountTransfers. Otherwise, use Territory from
tblShipments. Any thoughts on how I can do this?