DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Tuesday, August 25, 2015

Query to find concurrent requests submitted by a single user for last one day


Concurrent requests by a single user for last one day:

SELECT DISTINCT(REQUEST_ID),PARENT_REQUEST_ID ,u.user_name,
DECODE (r.PHASE_CODE,'C','Completed',
                     'I','Inactive',
                     'P','Pending',
                     'R','Running') "PHASE CODE",
DECODE (r.STATUS_CODE,'A','Waiting',
                      'B','Resuming',
                      'C','Normal',          
                      'D','Cancelled',
                      'E','Error',
                      'F','Scheduled',
                      'G','Warning',
                      'H','On Hold',
                      'I','Normal',
                      'M','No Manager',
                      'Q','Standby',
                      'R','Normal',
                      'S','Suspended',
                      'T','Terminating',
                      'U','Disabled',
                      'W','Paused',
                      'X','Terminated',
                      'Z','Waiting') "STATUS CODE",
REQUESTED_START_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETION_DATE
FROM fnd_concurrent_requests r, fnd_user u
WHERE u.user_name LIKE UPPER('%&USERNAME%')
AND u.USER_ID=r.REQUESTED_by
AND TRUNC(ACTUAL_COMPLETION_DATE) BETWEEN SYSDATE-1 AND SYSDATE;

No comments: