Hi
I am trying to create a trigger on a database called dbo.DHCPReport, which has a column called "returneduserclass nvarChar(128)". I want to have the trigger send a email when the returneduserclass column is populated with the following "NACDeny". the trigger I have is below, currently all this does is email when any "insert" occurs
create TRIGGER [dbo].[email_IT8] ON [ReportStore].[dbo].[DHCPReport] FOR update AS DECLARE @returneduserclass nvarChar(128) if update(returneduserclass) SELECT @returneduserclass='nacdeny'
Where am I going wrong ?