Purge specific records from AR Invoice History-VI or SQL?

Running Sage 100 Premium 2021: need to reduce the size of the AR Invoice History tables. The purge invoice history utility is good as far as it goes, but I need to remove invoices for only one division that creates thousands of repetitive invoices monthly--while retaining invoices in other divisions that contain equipment sales. I know I can use perform logic to delete records via Visual Integrator, but now that we're on Premium it would be SO much easier simply to remove them via SQL query.

I believe the only tables I need to touch are AR_InvoiceHistoryHeader, AR_InvoiceHistoryDetail, and AR_InvoiceHistoryTaxSummary... other tables starting with AR_InvoiceHistory... do not contain data for the invoices in question.

I know Visual Integrator uses validation logic so for imports is highly preferable, but for this specific task, removing invoice history for invoices that are over 5 years old and thus not in sales tax or open invoice tables, is there a valid reason to go that route, given the additional steps it will require?

Parents Reply Children