DELETE FROM VCLib.T_CLIENT_MODULE_FEATURE
WHERE ClientModules IN (
    SELECT ClientModuleID
    FROM VCLib.T_CLIENT_MODULES
    WHERE ModuleType IN ('InsuredRightsClientModule', 'ControlRegistrationClientModule', 'ControlRegistrationClientModuleSecondLevel')
);

DELETE FROM VCLib.T_CLIENT_MODULES
WHERE ModuleType IN ('InsuredRightsClientModule', 'ControlRegistrationClientModule', 'ControlRegistrationClientModuleSecondLevel');