I have a simple one for any database guys out there.
I have the fields isActive (bit) and Inactive_Date (datetime) in the table users.
I need a trigger to update the Inactive_Date field with CURDATE() when the field isActive is updated to 0 (False).
There are circumstances where this field would already be 0 but updated to the same value (during imports). I do not want Inactive_Date updated under these circumstances. It should only happen when the field changes from 1 to 0.
SQL 2008 R2