-- @NotificationsStatus is table type variable
UPDATE n
SET
n.Name = ns.Name,
n.EmpCode = ns.EmpCode,
n.EmailProcessingStatus =
CASE WHEN ns.EmailProcessingStatus IS NOT NULL THEN ns.EmailProcessingStatus ELSE n.EmailProcessingStatus END,
n.MobileProcessingStatus =
CASE WHEN ns.MobileProcessingStatus IS...