-- MOPDB
INSERT INTO CT_MRDS.A_TASK_HISTORY_SOURCE (
	A_TASK_HISTORY_SOURCE_KEY,
	A_TASK_HISTORY_KEY,
	A_WORKFLOW_HISTORY_SOURCE_KEY,
	SOURCE_NAME,
	ROW_COUNT,
	SERVICE_NAME
)
SELECT 
    A_LOAD_HISTORY_SOURCE_KEY as A_TASK_HISTORY_SOURCE_KEY,
    A_LOAD_SUBPROCESS_FK as A_TASK_HISTORY_KEY,
    A_ODS_LOAD_SET_FK as A_WORKFLOW_HISTORY_SOURCE_KEY,
    SOURCE_TABLE_NAME as SOURCE_NAME ,
    ROW_COUNT as ROW_COUNT ,
    'MOPDB' AS SERVICE_NAME 
FROM
    CT_MOPDB.A_LOAD_HISTORY_SOURCE
WHERE
    SOURCE_TABLE_NAME IN (
      'OU_CSDB_DEBT', 
      'OU_CSDB_DEBT_DAILY',
      'OU_CSDB_INSTR_DESC_FULL',
      'OU_CSDB_ISSUER_DESC_FULL'
    );


COMMIT;	

