Jagjit Saini

Jagjit Saini

  • NA
  • 196
  • 38.7k

Trigger or Notification

Apr 7 2022 1:07 PM

Hi

 I want if record added/updated in particular table before a particular date say 30/03/2022 i should get message or notification or email should go.

Log should also get maintained of that entry

I want email should go and if date entered is < 30/03/2022 Below is the code

CREATE TRIGGER dbo.TRG_Users_ChangeTracking
ON dbo.Users
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;

INSERT INTO ChangeTrackingHistory(UserID)
SELECT i.UserID
FROM inserted AS i;
END
GO

Thanks


Answers (1)