I have never created a trigger, but I have been asked to research if this is possible. I have a table (which I cannot change) containing records with the following fields:Item ID, Field ID, Field Value
Each Item ID can have multiple records. There will always be a record for Field ID 59, for Field ID 63, for Field ID 64, for Field ID 72, for Field ID 99, and there might be additional records with other Field IDs that I don't care about and that I wouldn't want to change.
If someone updates the Field Value on one or more of the 59, 63, 64, or 72 records for a specific Item ID, I need to recalculate the Field Value for its 99 record based on the values in the 59, 63, 64, and 72 records. Can I do this with a trigger? Or maybe the question is - Should I do this with a trigger?
Each Item ID can have multiple records. There will always be a record for Field ID 59, for Field ID 63, for Field ID 64, for Field ID 72, for Field ID 99, and there might be additional records with other Field IDs that I don't care about and that I wouldn't want to change.
If someone updates the Field Value on one or more of the 59, 63, 64, or 72 records for a specific Item ID, I need to recalculate the Field Value for its 99 record based on the values in the 59, 63, 64, and 72 records. Can I do this with a trigger? Or maybe the question is - Should I do this with a trigger?