Avatar of Negash
Negash
Flag for United States of America asked on

How do I write a SQL Server 2008 Stored Procedure

Here is what I am trying to do:
Send an e-mail when the value of a column 'SerialNo' is greater than 1500

Select wksNo, serialNo, from Tickets where serialNo > 1500  
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
Guy Hengel [angelIII / a3]

8/22/2022 - Mon
Guy Hengel [angelIII / a3]

and what exactly is the issue ?
* creating the trigger to do something
* sending email
* ...

I would create a trigger on insert/update, and put the primary key information into a table
a scheduled job, to be run every 5 minutes, would take the rows from that table, and send an email based on the information, and delete the rows on successful sending
Negash

ASKER
The issue is creating the trigger
ASKER CERTIFIED SOLUTION
Guy Hengel [angelIII / a3]

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23