Wednesday, April 14, 2010

Last Gather Schema/Table Concurrent Processes ran for HR or ALL

*** Last Gather Schema/Table Concurrent Processes ran for HR or ALL ***


COLUMN pReqId      format a10 heading 'Request|ID'
COLUMN pProg       format a15 heading 'Concurrent|Process'
COLUMN parentReqId format a10 heading 'Parent'
COLUMN pStatus     format a10 heading 'Phase|Status'
COLUMN pParms      format a30 heading 'Parameters'
COLUMN pStartDate  format a6 heading 'Start|Date'
COLUMN pEndDate    format a6 heading 'End|Date'
COLUMN pMinutes    format a5 heading 'Dur.|(Min)'

SELECT * FROM (
SELECT TO_CHAR(request_id) pReqId
   , program pProg
   , TO_CHAR(decode(fcrs.PARENT_REQUEST_ID,-1,null,fcrs.PARENT_REQUEST_ID)) parentReqId
   , PHAS.MEANING || ' ' || STAT.MEANING pStatus
   , fcrs.ARGUMENT_TEXT pParms
   ,REQUESTED_START_DATE pStartDate
   ,ACTUAL_COMPLETION_DATE pEndDate
   , to_char(round((fcrs.ACTUAL_COMPLETION_DATE - fcrs.REQUESTED_START_DATE) * 1440)) pMinutes
FROM FND_CONC_REQ_SUMMARY_V fcrs
 , FND_LOOKUPS STAT
 , FND_LOOKUPS PHAS
WHERE STAT.LOOKUP_CODE = FCRS.STATUS_CODE
AND STAT.LOOKUP_TYPE = 'CP_STATUS_CODE'
AND PHAS.LOOKUP_CODE = FCRS.PHASE_CODE
AND PHAS.LOOKUP_TYPE = 'CP_PHASE_CODE'
AND UPPER(program) LIKE 'GATHER%'
AND substr(UPPER(ARGUMENT_TEXT),1,3) in ('HR,','ALL')
ORDER BY 1 desc)
where rownum < 2;

Note:
===> Remove the last line --- where rownum < 2;
         to get all the resquests history

No comments:

Post a Comment