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 |
|
amitfrd.iet
Starting Member
2 Posts |
Posted - 2008-12-10 : 01:31:13
|
| Update trigger for multiple rowsi have a update trigger that get fired when any column updated of the tablecreate TRIGGER trigger_Update_ABCON ABCFOR UpdateASdeclare @Id bigintset @Id = (select Id from Inserted)update ABC set ABC.Post = getdate() where Id =@Idwhen i execute such sql quarryUpdate ABC set ABC.Active = 1 where ABC.Id in(1,4,5,6,3,7)then i got error because of multiple row updation |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
amitfrd.iet
Starting Member
2 Posts |
Posted - 2008-12-10 : 02:00:35
|
| than x its helpsbut the my problem is i have to update sate table 's "Post"column that updated with current getdate() function so its call an infinite looping..so how can i know that if the "Post" column update we do not fire this trigger |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-10 : 02:27:27
|
| [code]create TRIGGER trigger_Update_ABCON ABCFOR UpdateASupdate a set a.Post = getdate() FROM ABC aJOIN INSERTED iON i.Id =a.Id[/code] |
 |
|
|
|
|
|