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
 General SQL Server Forums
 New to SQL Server Programming
 trigger based on specific field??

Author  Topic 

phrankbooth
Posting Yak Master

162 Posts

Posted - 2008-01-11 : 16:35:11
Do triggers work on the field level or only for full table updates, etc...?

I want to have a trigger that will change a field on another table based on the update of a specific field on a table.

Could anyone provide a sample please, if this is possible?

Thank you!

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2008-01-11 : 16:42:15
The trigger will fire for the entire row. Inside your trigger code you can customize the action that needs to be performed depending on which column was updated.

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

gint3232
Starting Member

2 Posts

Posted - 2008-01-19 : 16:55:03
[url][/url] would be good if you got a sample as I need to do almost the same, Addtionally how do you get a trigger to email you when say a count of something does not match a count of some thing else
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-20 : 08:29:44
quote:
Originally posted by gint3232

[url][/url] would be good if you got a sample as I need to do almost the same, Addtionally how do you get a trigger to email you when say a count of something does not match a count of some thing else


might help you on this:-

[url]http://www.4guysfromrolla.com/webtech/tips/t051706-1.shtml[/url]
Go to Top of Page
   

- Advertisement -