OK I have the following trigger:
ALTER TRIGGER [dbo].[tr_AddressUpdate]
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
IF (UPDATE(DistCity)) OR (UPDATE(DistState))
SET Changed = 1
-- Insert statements for trigger here
I want to update a column (Changed) when I insert or update the city or state field with 1
This works for update but not when I do an insert. When I insert a new record it updates every record in the table.
What am I doing wrong? Please help. Thanks!