RE: SQL SERVER 2000 trigger for Audit trail
Something like this should get you most of the way: create TRIGGER [name] ON FOR INSERT AS update set created_by = SUSER_SNAME(), last_modified_by = SUSER_SNAME(), date_created = GETDATE(), date_last_modified = GETDATE() from inserted where .Seqno = inserted.seqno; create TRIGGER [name] ON FOR UPDATE AS update set last_modified_by = SUSER_SNAME(), date_last_modified = GETDATE() from inserted where […]
2004-07-29