James Asante
Old Hand
Points: 361
More actions
March 29, 2005 at 9:54 pm
#61000
Table name: FromTrainersTable
Primary Key name: FTKey
Field name to update with current date and time: timestamp1
Event: When field name [Day1] is updated
Please help me with a trigger to register the timestamp when the Day1 check box is updated.
David.Poole
SSC Guru
Points: 76039
March 30, 2005 at 12:21 am
#549474
CREATE TRIGGER tr_FromTrainersTable ON FromTrainersTable FOR UPDATE
AS
IF UPDATE(Day1)
UPDATE FromTrainersTable
SET TimeStamp1 = GETDATE()
FROM FromTrainersTable INNER JOIN inserted ON FromTrainersTable.FTKey = inserted.FTKey
WHERE FromTrainersTable.Day1 inserted.Day1
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply