|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Execute an sp by via a trigger?Is it possible to execute a stored procedure by a trigger on insert event? If
so, how should i create the trigger? I created as like below but it did not work; create trigger tg_sms on SMS FOR INSERT AS my_sp How should i write this? At the simplest level all that was missing is EXEC before the stored
procedure name. create trigger tg_sms on SMS FOR INSERT AS EXEC my_sp Roy Harvey Beacon Falls, CT On Thu, 8 Jun 2006 04:17:02 -0700, basulasz <basul***@discussions.microsoft.com> wrote: Show quote >Is it possible to execute a stored procedure by a trigger on insert event? If >so, how should i create the trigger? I created as like below but it did not >work; > >create trigger tg_sms on SMS >FOR INSERT >AS my_sp > >How should i write this? thanx Roy...
Show quote "Roy Harvey" wrote: > At the simplest level all that was missing is EXEC before the stored > procedure name. > > create trigger tg_sms on SMS > FOR INSERT > AS EXEC my_sp > > Roy Harvey > Beacon Falls, CT > > On Thu, 8 Jun 2006 04:17:02 -0700, basulasz > <basul***@discussions.microsoft.com> wrote: > > >Is it possible to execute a stored procedure by a trigger on insert event? If > >so, how should i create the trigger? I created as like below but it did not > >work; > > > >create trigger tg_sms on SMS > >FOR INSERT > >AS my_sp > > > >How should i write this? > |
|||||||||||||||||||||||