Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Can a Trigger be Fired Through Another Trigger?

Author  Topic 

Peace2007
Posting Yak Master

239 Posts

Posted - 2008-08-24 : 04:03:07
Hi,

I need to fire a trigger through another trigger is that possible.
The exact scenario is as follows:
I need when a change is done in a table, a trigger created on a view be fired.

Any idea is appreciated

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-08-24 : 04:47:18
You can't fire a trigger directly. The only way to fire a trigger is to make the relevant change to the table/view that the trigger is on.

Can you put the code into a stored procedure and call that from the trigger?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-08-24 : 09:44:59
this kind of logic has an extreme potential to turn into a nightmare. be carefull with it

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!
Go to Top of Page

Peace2007
Posting Yak Master

239 Posts

Posted - 2008-08-24 : 23:48:07
quote:
Originally posted by spirit1

this kind of logic has an extreme potential to turn into a nightmare. be carefull with it



Then I wont go through that
Go to Top of Page
   

- Advertisement -