--*********************************************
--* USE db staging_namecheck !!db
--*********************************************

USE staging_namecheck;
GO

SET NOCOUNT ON;
SET XACT_ABORT ON;

SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
GO


--TM_base_model.plibf      - OrgClients\Mercantil\Transaction Monitoring\Base Model\txm_Profiling_BaseModel


DECLARE @ModelImplID       INT = (
            SELECT TOP 1 c.ModelImplID
            FROM   plib_namecheck.dbo.v_ccr_plib_models AS c
            WHERE  c.model_path = 
                   'OrgClients\Mercantil\Transaction Monitoring\Base Model\txm_Profiling_BaseModel'
                   AND c.db = 'ccr'
        )
DECLARE @task VARCHAR(MAX)
DECLARE @RC INT
DECLARE @task_id BIGINT
SET @task = 
    '{
                                        task_name = "CCR:UPDATE_FIELDS",
                                        verid = ' + CAST(@ModelImplID AS VARCHAR(100)) + 
    ' 
                                    }'
                    
EXECUTE @RC = [BROKER_data_request_v2] @task,
     @task_id OUTPUT
                        
PRINT 'CCR:UPDATE_FIELDS: ' + 'OrgClients\Mercantil\Transaction Monitoring\Base Model\txm_Profiling_BaseModel @task_id:' + CAST(@task_id AS VARCHAR(100));   
                       
GO







--*********************************************
--* USE db staging_namecheck !!db
--*********************************************

USE staging_namecheck;
GO

SET NOCOUNT ON;
SET XACT_ABORT ON;

SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
GO


--TM_base_model.plibf      - OrgClients\BTV\Transaction Monitoring\Base Model\txm_Profiling_BaseModel


DECLARE @ModelImplID       INT = (
            SELECT TOP 1 c.ModelImplID
            FROM   plib_namecheck.dbo.v_ccr_plib_models AS c
            WHERE  c.model_path = 
                   'OrgClients\BTV\Transaction Monitoring\Base Model\txm_Profiling_BaseModel'
                   AND c.db = 'ccr'
        )
DECLARE @task VARCHAR(MAX)
DECLARE @RC INT
DECLARE @task_id BIGINT
SET @task = 
    '{
                                        task_name = "CCR:UPDATE_FIELDS",
                                        verid = ' + CAST(@ModelImplID AS VARCHAR(100)) + 
    ' 
                                    }'
                    
EXECUTE @RC = [BROKER_data_request_v2] @task,
     @task_id OUTPUT
                        
PRINT 'CCR:UPDATE_FIELDS: ' + 'OrgClients\BTV\Transaction Monitoring\Base Model\txm_Profiling_BaseModel @task_id:' + CAST(@task_id AS VARCHAR(100));   
                       
GO



