I have a trigger that is supposed to copy a single record into an audit table any time a field in a record is changed. The application maintains a monthly report for 28 regions. Each report consists of 15 questions and thus 15 records per report per month. When a user makes a change to a single question and saves their change, I dont get the single audit table record I expect. Instead I get 420 records. That is one record for every question and every region for the month. What is wrong with my trigger?
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
ALTER trigger [dbo].[Audit_Trigger_ChangesBy] on [dbo].[tbl_stmt] for update
insert into Audit_Log
select e_id, e_month, e_lastupdated_by, e_date_lastupdated, e_submitted_by, e_date_submitted, getdate() from inserted
SET ANSI_PADDING OFF