Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with triggers

Status
Not open for further replies.

jkmak

IS-IT--Management
Joined
Aug 8, 2001
Messages
1
Location
US
I'd like to write a trigger. I'm told that they are wonderful, but have never written one. I'm trying to read a table, once the table is updated, gather SOME of that dat and update it in another table (both in the same database). Can someone guide me to some examples?

Thanks, Jeff
 
While triggers can be "wonderful", they have a downside, and that is the performance impact they can have. Consider carefully whether you need a trigger to solve each issue you deal with, as they can significantly impact the performance of updates and inserts.

For example, say you need some fields from TableA to be copied to TableB when records are inserted. A trigger is normally what comes to mind. But imagine that TableB does not need to be up-to-the-minute; in fact, it can be stale for up to 24 hours without any business impact. In that situation, having a scheduled job to run once/twice/whenever per day would do the job, and more efficiently. Robert Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top