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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-09-19 : 10:11:07
|
| Enda writes "Hi,Below is an update trigger that won't fire or at least doesn't seem to be firing. All it is supposed to do is just add audit information to an audit table ie. both origin table and audit table are exactly same except for constraints.Any ideas,Thanks.CREATE TRIGGER updEmployeeON dbo.EmployeeFOR update AS IF (COLUMNS_UPDATED()) > 0 BEGIN -- Audit OLD record. INSERT INTO EmployeeAudit(EmployeeId,FirstName,LastName,Address1,Address2,Address3,Address4,Address5,PassportNumber)SELECT del.EmployeeId,del.FirstName,del.LastName,del.Address1,del.Address2,del.Address3,del.Address4,del.Address5,del.PassportNumberFROM deleted del END " |
|
|
|
|
|
|
|