Tuesday, 18 September 2018

Query - Concurrent Program Summary - Completed-Error-Warning-running-Terminated

SELECT fcpt.USER_CONCURRENT_PROGRAM_NAME PROGRAM_NAME ,trunc(fcr.ACTUAL_START_DATE) ACTUAL_START_DATE,fcr.phase_code
     ,sum(decode(fcr.status_code,'C',1,0))completed_program_cnt
     ,sum(decode(fcr.status_code,'E',1,0))error_program_cnt
     ,sum(decode(fcr.status_code,'W',1,0))warning_program_cnt
     ,sum(decode(fcr.status_code,'R',1,0))running_program_cnt
     ,sum(decode(fcr.status_code,'D',1,0))Terminated_program_cnt
     ,count(1) Total_program_count
FROM FND_CONCURRENT_REQUESTS fcr, FND_CONCURRENT_PROGRAMS_TL fcpt
WHERE fcr.CONCURRENT_PROGRAM_ID = fcpt.CONCURRENT_PROGRAM_ID
AND fcpt.USER_CONCURRENT_PROGRAM_NAME LIKE 'Accounting Program'
Group by trunc(fcr.ACTUAL_START_DATE),fcpt.USER_CONCURRENT_PROGRAM_NAME,fcr.phase_code
order by 1,2,3 ;

No comments:

Post a Comment