All,
Grateful for any help you can provide with manipulating some data within a table....
I have an table which contains a list of components according to category, subcategory, subsubcategory and component. The table holds a total, overhead and used value for each component. For components with the same category, subcategory and component ID, I need to copy the total value across if the subsubcategory has a certain fixd value (1 in my example) to all entries with the matching category, subcategory and componentID, but different subsubcategory. The fields to be updated will be null before the update, adn I need to test for that as part of the condition. I also need to sum the overhead values for all matching entries and copy this into the subsubcategory "1" entry. Hard to put this into words, but I've attached a stock table and a "result" table that shows what I need the outcome to look like. Ideally this will update in the same table, but no big deal to use a temporary table or a separate "result" table if necessary, as it will mainly be used for reporting results.
I've tried various update queries and SQL but without success. Grateful for any help you can provide,
Many thanks....