delete from bfs
from vclib.t_BASE_FEATURE_SETTINGS bfs join vclib.T_CLIENT_MODULE_FEATURE cmf on bfs.ClientModuleFeature = cmf.ClientModuleFeatureID
where name = 'ArmLocalAdminWorkSpaceWeb' 
and ClientModules = (select top 1 ClientModuleId from vclib.T_CLIENT_MODULES cm where cm.ModuleType = 'HospitalARMSClientModule')
GO

delete from vclib.T_CLIENT_MODULE_FEATURE 
where name = 'ArmLocalAdminWorkSpaceWeb' 
and ClientModules = (select top 1 ClientModuleId from vclib.T_CLIENT_MODULES cm where cm.ModuleType = 'HospitalARMSClientModule')
GO