SELECT r.request_id, r.status_code, r.request_date,
TO_CHAR (r.request_date, 'DD-MON-YYYY')
reqdate,
TRUNC (
AVG (
( TO_NUMBER (TO_CHAR (r.actual_completion_date, 'SSSSS'))
- TO_NUMBER (TO_CHAR (r.actual_start_date, 'SSSSS'))
)
/ 60
),
2
)
"Time in Min.",
r.requested_start_date, r.hold_flag, r.parent_request_id,
r.last_update_date, u1.user_name updated_by_name, r.actual_start_date,
r.completion_text, r.actual_completion_date, u2.user_name requestor,
fa.application_name
application_name,
DECODE (
r.description,
NULL,
cp.user_concurrent_program_name,
r.description || ' (' || cp.user_concurrent_program_name || ')'
)
program_name
FROM fnd_concurrent_requests r,
fnd_concurrent_programs_vl cp,
fnd_user u1,
fnd_user u2,
fnd_application_vl fa
WHERE r.program_application_id = fa.application_id
AND r.program_application_id = cp.application_id(+)
AND r.concurrent_program_id = cp.concurrent_program_id(+)
AND r.last_updated_by = u1.user_id(+)
AND r.requested_by = u2.user_id(+)
GROUP BY r.request_id,
r.status_code,
r.request_date,
r.requested_start_date,
r.hold_flag,
r.parent_request_id,
r.last_update_date,
u1.user_name,
r.actual_start_date,
r.completion_text,
r.actual_completion_date,
u2.user_name,
fa.application_name,
DECODE (
r.description,
NULL,
cp.user_concurrent_program_name,
r.description || ' (' || cp.user_concurrent_program_name || ')'
)
No comments:
Post a Comment