SET @enabled := (SELECT IF(`value`=1,1,0) FROM `ohrm_config` WHERE `property`='pim_show_deprecated_fields');
UPDATE `ohrm_pim_field` SET `enabled`= @enabled WHERE `field_name` IN ('smoker','nickName','militaryService');

SET @enabled := (SELECT IF(`value`=1,1,0) FROM `ohrm_config` WHERE `property`='pim_show_sin');
UPDATE `ohrm_pim_field` SET `enabled`= @enabled WHERE `field_name` IN ('sin');

SET @enabled := (SELECT IF(`value`=1,1,0) FROM `ohrm_config` WHERE `property`='pim_show_ssn');
UPDATE `ohrm_pim_field` SET `enabled`= @enabled WHERE `field_name` IN ('mainId');