INSERT INTO VCLib.T_BASE_FEATURE_SETTINGS
           (BaseFeatureSettingsID
           ,ClientModuleFeature
           ,RoleClientModules
           ,type_)
     select
           CAST(NEWID() As varchar(50))
           ,(select ClientModuleFeatureID from VCLib.T_CLIENT_MODULE_FEATURE as cmf
				where cmf.ClientModules = 
				(select ClientModuleID from VCLib.T_CLIENT_MODULES where ModuleType = 'TarifAgreementClientModule')
				and cmf.Name = 'CanEdit')
           ,RoleClientModuleID
           ,202
	from VCLib.T_ROLE_CLIENT_MODULES rcm
	where rcm.ClientModuleID in
	(select ClientModuleID from VCLib.T_CLIENT_MODULES where ModuleType = 'TarifAgreementClientModule')

INSERT INTO VCLib.T_BASE_FEATURE_SETTINGS
           (BaseFeatureSettingsID
           ,ClientModuleFeature
           ,RoleClientModules
           ,type_)
     select
           CAST(NEWID() As varchar(50))
           ,(select ClientModuleFeatureID from VCLib.T_CLIENT_MODULE_FEATURE as cmf
				where cmf.ClientModules = 
				(select ClientModuleID from VCLib.T_CLIENT_MODULES where ModuleType = 'ExpertiseFiltersEditiorClientModule')
				and cmf.Name = 'CanEdit')
           ,RoleClientModuleID
           ,202
	from VCLib.T_ROLE_CLIENT_MODULES rcm
	where rcm.ClientModuleID in
	(select ClientModuleID from VCLib.T_CLIENT_MODULES where ModuleType = 'ExpertiseFiltersEditiorClientModule')
