DELETE FROM VCLib.T_BASE_FEATURE_SETTINGS 
WHERE EXISTS (
    SELECT 1 
    FROM VCLib.T_CLIENT_MODULE_FEATURE 
    WHERE T_CLIENT_MODULE_FEATURE.ClientModuleFeatureID = VCLib.T_BASE_FEATURE_SETTINGS.ClientModuleFeature
    AND T_CLIENT_MODULE_FEATURE.Name = 'EKbHospRefferal'
);

DELETE FROM VCLib.T_CLIENT_MODULE_FEATURE 
WHERE Name = 'EKbHospRefferal';