1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| --Liste de l'historique des sessions - Longues sessions==> ok
SELECT subject_area, workflow_name, instance_name,
TO_CHAR (start_time, 'Dy MM/DD/YYYY HH:MI:SS AM') start_time,
TO_CHAR (end_time, 'Dy MM/DD/YYYY HH:MI:SS AM') end_time,
ROUND (((end_time - start_time) * 24) * 60) elapsed
FROM REPO_PR.rep_TASK_INST_RUN
WHERE task_type = 68 --correspond à la session
AND start_time >= TO_DATE ('04/16/2019', 'mm/dd/yyyy')
AND subject_area = 'ABC'
ORDER BY start_time ASC;
--affiche les requetes de attr_value concernant ABC
select A.INSTANCE_ID, A.ATTR_VALUE,A.MAPPING_ID
from REPO_PR.OPB_WIDGET_ATTR A
where ATTR_VALUE LIKE '%select%'
and ATTR_VALUE LIKE '%ABC%';
-- Requête après jointure
SELECT R.subject_area, R.workflow_name, R.instance_name, R.INSTANCE_ID, A.ATTR_VALUE, A.MAPPING_ID,
TO_CHAR (start_time, 'Dy MM/DD/YYYY HH:MI:SS AM') start_time,
TO_CHAR (end_time, 'Dy MM/DD/YYYY HH:MI:SS AM') end_time,
ROUND (((end_time - start_time) * 24) * 60) elapsed
FROM REPO_PR.REP_task_inst_run R -- select * from REPO_PR.REP_task_inst_run
INNER JOIN REPO_PR.OPB_WIDGET_ATTR A
ON R.INSTANCE_ID = A.INSTANCE_ID
AND task_type = 68
AND start_time >= TO_DATE ('04/16/2019', 'mm/dd/yyyy')
AND subject_area = 'PR_TIERS'
--AND A.ATTR_VALUE LIKE '%select%'
--and A.ATTR_VALUE LIKE '%ABC%'
ORDER BY 1, 2; |
Partager