Configuring for Sage 500
In the DwSage500 SQL data warehouse, Modify the _C_Company view to filter to only include the active companies.
Sage 500 keys are unique across the companies that are in the same SQL data base. So only the Transaction Headers have an indexed Company ID field. In the SQL reporting views, all Transaction Headers link with an EQUAL join to _C_Company. And an EQUAL join to the transaction lines. Thus, the filters in _C_Company limit all "_B_"-views-based transaction reporting to only active companies.
Other data warehouse tables do have the Company ID field, but out of the box, it is not indexed.
SA Sales reporting imports the Warehouse and the line-level ShipToAddrKey from tsoSOLineDist.WhseKey. SO if sales reporting by warehouse or line-level ShipTo address is desired, tsoSOLineDist table will need to be included in the ETL refresh batch process. The tarInvoice.ShipToAddrKey could be substituted into the _B_SA_SalesHeader then into the _B_SA_Sales views, if all invoices ship to the same address.