February 26, 20169 yr Basic database Customer --< Location ---< Invoices UID keys to foreign keys pretty typical... However the billing company is changing for many locations - it was a distributorship that is winding down and each location are going to be billed directly.. To preserve historical data. one thought would be to ad a multi predicate between locations and Invoices so that oldCustomer / location invoices remain linked and when the new customer UID is assigned to the location only new invoices are connected. other though was to add GetContainerAttribute ( List ( customer_UID ; location_id) ; "md5" ) to the location table and use that as the key between location & invoice. they both do the trick but I am probably making it much more convoluted then need be. OR the real solution would be to create a script to duplicate the location assign a new customer - and then setting status on the prior customer / location to closed. and of course script duplicate all the associated tables that are needed for future invoices. But then trying to consolidate reports by location / company will be fun.
Create an account or sign in to comment