declare @ClientModuleID uniqueidentifier
select @ClientModuleID = ClientModuleID from VCLib.T_CLIENT_MODULES cm where cm.[Schema] = 'AKUZ' and cm.ModuleType = 'ImportClientModule'

delete from VCLib.T_NEWS_BOX_LINK_MODULE where ClientModules = @ClientModuleID
delete from VCLib.T_ADD_DOCUMENT_LINK_MODULE where ClientModules = @ClientModuleID
delete from VCLib.T_ROLE_CLIENT_MODULES where ClientModuleID = @ClientModuleID
delete from VCLib.T_CLIENT_MODULES where ClientModuleID = @ClientModuleID

select @ClientModuleID = ClientModuleID from VCLib.T_CLIENT_MODULES cm where cm.[Schema] = 'AKUZ' and cm.ModuleType = 'RegistersClientModule'

delete from VCLib.T_NEWS_BOX_LINK_MODULE where ClientModules = @ClientModuleID
delete from VCLib.T_ADD_DOCUMENT_LINK_MODULE where ClientModules = @ClientModuleID
delete from VCLib.T_ROLE_CLIENT_MODULES where ClientModuleID = @ClientModuleID
delete from VCLib.T_CLIENT_MODULES where ClientModuleID = @ClientModuleID