Orphan record in CMN_SCH_JOB_RUNS tables. The orphans are not getting created recently but due to old defect DE56070 which is fixed is 15.9.2
Steps to Reproduce:
SELECT
*
FROM
CMN_SCH_JOB_RUNS CSJR
WHERE
CSJR.JOB_ID NOT IN (
SELECT
J.ID
FROM
CMN_SCH_JOBS J,
CMN_SCH_JOB_DEFINITIONS JD,
CMN_LOOKUPS L
WHERE
JOB_DEFINITION_ID = JD.ID
AND JD.JOB_TYPE = L.ID
AND L.LOOKUP_CODE != 'REPORT'
AND L.LOOKUP_TYPE = 'SCH_JOB_TYPE' )
Expected Results: No orphan should be found at table CMN_SCH_JOB_RUNS
Actual Results: Table CMN_SCH_JOB_RUNS contains Orphans
Clarity Release 16.x
DE154527
In Order to fix DE154527
DELETE
FROM
CMN_SCH_JOB_RUNS CSJR
WHERE
CSJR.JOB_ID NOT IN (
SELECT
J.ID
FROM
CMN_SCH_JOBS J,
CMN_SCH_JOB_DEFINITIONS JD,
CMN_LOOKUPS L
WHERE
JOB_DEFINITION_ID = JD.ID
AND JD.JOB_TYPE = L.ID
AND L.LOOKUP_CODE != 'REPORT'
AND L.LOOKUP_TYPE = 'SCH_JOB_TYPE' )