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.
| Author |
Topic |
|
aoriju
Posting Yak Master
156 Posts |
Posted - 2012-02-17 : 02:54:45
|
| Hi All,I am looking for a database trigger for updating the some of my tablescondition is : i have a table (table1) and field like status through my application i will update various status and corresponding dateswhen status is 3 i want to update & insert some tables based on after 3 days of status updation like 3 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-17 : 13:45:02
|
something likeCREATE TRIGGER MyTriggON TableAFTER UPDATEASBEGINUPDATE tSET columns = value....FROM INSERTED iJOIN yourtable tON t.col = i.ColWHERE i.status = 3INSERT INTO tableSELECT columns...FROM INSERTED iJOIN yourtable t1ON t1.col = i.ColWHERE i.status = 3END ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|