I have a trigger under table tblSubscribe in my database and I currently have it where it triggers off of an Update command. It works off of all Updates that happen to the table currently
USE [xxxxxx] GO /****** Object: Trigger [dbo].[alertFCountTrigger] Script Date: 09/21/2012 16:29:49 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER TRIGGER [dbo].[alertFCountTrigger] ON [dbo].[tblSubscribe] AFTER UPDATE AS EXEC msdb.dbo.sp_send_dbmail @profile_name = 'xxxxx', @recipients = 'xxxxx', @body = 'TEST TEST TEST', @subject = 'Reminder';
I want to make modifications to my trigger, I have a column named Frequency where if that column = "Daily" the if statement would be true and a column name fCount and if that statement = 1 the if statement would be true (value initialized at 0).
Now I know you would have to declare and set those values in the trigger. Most likely after the "AFTER UPDATE AS" lines. Can someone please help me. Thanks