|
Christopher, The query works for what you want to do. I could make two suggestions: 1) Create a view for the group summary table. Then you could use the view in the query. This simplifies the SQL a bit but doesn't do anything about performance. You could make sure you have an index over the table by group which might be used for this view and might help performance. 2) Create a summary table for the group table. You'd clear the table then use INSERT from the detail table. If your group production amounts don't change that often or if it's ok to not be 'up to the minute' on the totals this might be worth doing. You can use the summary table in your queries for better performance of those queries. The refreshing of the summary table happens whenever it's needed (daily, weekly, whatever). Paul
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.