BattleDroid42
Programmer
How would I create a trigger to summarize the records in one table to a second?
For example, let's say I have an empty table (TABLE1) and I insert 10 records for 3 different people for different dollar amounts. I would like the trigger to append the totals for the 3 people in TABLE2. Then, the next time I append say 5 more records I would like it to take the added 5 records and append a summary of those records to TABLE2 as well without having to resummarize ALL the records. I want the tables to stay in sync during deletes as well.
How?
Thanks!
For example, let's say I have an empty table (TABLE1) and I insert 10 records for 3 different people for different dollar amounts. I would like the trigger to append the totals for the 3 people in TABLE2. Then, the next time I append say 5 more records I would like it to take the added 5 records and append a summary of those records to TABLE2 as well without having to resummarize ALL the records. I want the tables to stay in sync during deletes as well.
How?
Thanks!