Tuesday, 15 July 2014

Concurrent Program start and end time

SELECT rq.request_id,
          tl.user_concurrent_program_name,
          tl.description concurrent_program_description,
          TO_CHAR (rq.request_date, 'DD-MON-YYYY HH:MI:SS') request_date,
          fu.user_name user_id,
          fu.description user_name,
          TO_CHAR (rq.actual_start_date, 'DD-MON-YYYY HH:MI:SS') start_date,
          TO_CHAR (rq.actual_completion_date, 'DD-MON-YYYY HH:MI:SS') end_date,
          rq.actual_completion_date - rq.actual_start_date,
          ROUND ( (rq.actual_completion_date - rq.actual_start_date) * 1440, 2
          )
             run_time_minutes
   FROM fnd_concurrent_programs_tl tl,
        fnd_concurrent_requests rq,
        fnd_user fu
   WHERE     tl.application_id = rq.program_application_id
         AND tl.concurrent_program_id = rq.concurrent_program_id
         AND fu.user_id = rq.requested_by
         AND TRUNC (rq.request_date) >= '01-Jan-2013'           --sysdate - 90
         AND ROUND ( (rq.actual_completion_date - rq.actual_start_date) * 1440,
                    2
            ) >= 15
         AND rq.actual_start_date IS NOT NULL
         AND rq.actual_completion_date IS NOT NULL
   ORDER BY 1;

No comments:

Post a Comment