Posted on 2008-10-24
I have the following trigger, CREATE TRIGGER trg_Asgnmnt_OutOfOffice ON dbo.Asgnmnt
IF UPDATE(OutOfOffice) BEGIN
SET OutOfOffice = I.OutOfOffice,
OutOfOfficeUntilTime = I.OutOfOfficeUntilTime,
OutOfOfficeUntilDate = I.OutOfOfficeUntilDate
FROM dbo.Assignee A,
WHERE A.LoginID = I.LoginID
AND I.CallID = '00010000'
If OutOfOfficeUntilDate is empty (not NULL I just found it won't be NULL) I need to set it to today's date, what would be the proper syntax i was thinking an if statement after, OutOfOfficeUntilDate = I.OutOfOfficeUntilDate but wasn't sure what the else part of the if statement should be? Also i only want to change the value of OutOfOfficeUntilDate if that field is empty otherwise I want to keep what is in there.