delete t3
from vclib.T_CLIENT_MODULES t1
join vclib.T_CLIENT_MODULE_FEATURE t2 on (t1.ClientModuleID = t2.ClientModules)
join vclib.T_BASE_FEATURE_SETTINGS t3 on (t2.ClientModuleFeatureID = t3.ClientModuleFeature)
where t1.ModuleType in ('EconomistOMSClientModule') and t1.[Schema] = 'IES' and t2.Name = 'TempSchetZpSendEnabled'

delete t2
from vclib.T_CLIENT_MODULES t1
join vclib.T_CLIENT_MODULE_FEATURE t2 on (t1.ClientModuleID = t2.ClientModules)
where t1.ModuleType in ('EconomistOMSClientModule') and t1.[Schema] = 'IES' and t2.Name = 'TempSchetZpSendEnabled'

delete t3
from vclib.T_CLIENT_MODULES t1
join vclib.T_CLIENT_MODULE_FEATURE t2 on (t1.ClientModuleID = t2.ClientModules)
join vclib.T_BASE_FEATURE_SETTINGS t3 on (t2.ClientModuleFeatureID = t3.ClientModuleFeature)
where t1.ModuleType in ('ControlRegistrationClientModule') and t1.[Schema] = 'IES' and t2.Name = 'CsRequestButton'

delete t2
from vclib.T_CLIENT_MODULES t1
join vclib.T_CLIENT_MODULE_FEATURE t2 on (t1.ClientModuleID = t2.ClientModules)
where t1.ModuleType in ('ControlRegistrationClientModule') and t1.[Schema] = 'IES' and t2.Name = 'CsRequestButton'

delete t3
from vclib.T_CLIENT_MODULES t1
join vclib.T_CLIENT_MODULE_FEATURE t2 on (t1.ClientModuleID = t2.ClientModules)
join vclib.T_BASE_FEATURE_SETTINGS t3 on (t2.ClientModuleFeatureID = t3.ClientModuleFeature)
where t1.ModuleType in ('PolicyERZClientModule', 'FOMSPolicyPacketsClientModule', 'VCRSClientModule') and t1.[Schema] = 'IES'

delete t2
from vclib.T_CLIENT_MODULES t1
join vclib.T_CLIENT_MODULE_FEATURE t2 on (t1.ClientModuleID = t2.ClientModules)
where t1.ModuleType in ('PolicyERZClientModule', 'FOMSPolicyPacketsClientModule', 'VCRSClientModule') and t1.[Schema] = 'IES'

delete t2
from vclib.T_CLIENT_MODULES t1
join vclib.T_ROLE_CLIENT_MODULES t2 on (t1.ClientModuleID = t2.ClientModuleID)
where t1.ModuleType in ('PolicyERZClientModule', 'FOMSPolicyPacketsClientModule', 'VCRSClientModule') and t1.[Schema] = 'IES'

delete t1
from vclib.T_CLIENT_MODULES t1
where t1.ModuleType in ('PolicyERZClientModule', 'FOMSPolicyPacketsClientModule', 'VCRSClientModule') and t1.[Schema] = 'IES'

delete t1
from ies.T_COMPANY_SETTINGS_PARAMETER t1
where t1.ParamKey in ('IsRewriteOutZapPolicy', 'FFOMSValidation')