This is my trigger after update record.
The old.ActivatedDate
always is Null
and new.ActivatedDate
always is not Null
.
This is my code, but it is not working because its condition is not returning true to continue other jobs.
SET @OldActivateDate := OLD.ActivateDate;
SET @NewActivateDate := NEW.ActivateDate;
IF(@NewActivateDate IS NOT NULL AND @OldActivateDate IS NULL AND @OldActivateDate!=@NewActivateDate)
THEN
/* Do Some Functionality */
END IF;
I tested this method also, but again it is not working.
if (@NewActivateDate != @OldActivateDate) and ( @NewActivateDate is not null and @OldActivateDate is null )
THEN
/* Do Some Functionality */
END IF;