Solved

SQL Server 2000 - Help with simple trigger

Posted on 2013-01-26
2
321 Views
Last Modified: 2013-01-26
Hi..
I need a simple trigger to log all changes to a CUSTOMERS table.
I want to crate a a table call CUSTOMERS_LOG  (copy of Customers table) and log the ALL the fields and changes - Maybe include a field for Insert, Update , Delete with a timestamp.

thx
0
Comment
Question by:JElster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38822165
If you search the web for such trigger code, you should find examples...
And if you have a specific problem, we can help.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 400 total points
ID: 38823046
Here is one example from a member of this site:
Generic audit trail trigger
http://www.nigelrivett.net/SQLTriggers/AuditTrailTrigger.html
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question