July 15, 2015 at 9:21 am
Hello,
I wanted to know if it is possible to run a stored proc (report) when a new record is inserted / updated into a certain table. Also if it could do so for records with a column that meet a certain criteria ie. sell description like '%test%'
July 15, 2015 at 9:26 am
Yes, with a trigger, however running long processes from a trigger is a really bad idea. Probably better to put the report code in a SQL job and in the trigger start the job if the conditions are met. That way the insert/update finishes immediately and the job can run async.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 15, 2015 at 10:05 am
Hey I appreciate the quick response. I havne't done much work with triggers and am looking up resources on how to get a trigger to catch a certain condition on a column as you said. Can you weigh in on that? Thanks!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply