Sunteți pe pagina 1din 2

---------Oracle sql query for concurrent details:-----------

SELECT user_name
FROM (SELECT fu.user_name,
DENSE_RANK () OVER (ORDER BY user_name ASC)
ranking
FROM fnd_user fu,
per_all_people_f papf,
per_all_assignments_f paaf,
per_business_groups pbg
WHERE TRUNC (SYSDATE) BETWEEN NVL (fu.start_date,
TRUNC (SYSDATE))
AND NVL (fu.end_date,
TRUNC (SYSDATE))
AND fu.employee_id = papf.person_id
AND papf.current_employee_flag = 'Y'
AND TRUNC (SYSDATE) BETWEEN papf.effective_start_date
AND papf.effective_end_date
AND papf.person_id = paaf.person_id
AND papf.business_group_id =
paaf.business_group_id
AND pbg.business_group_id =
papf.business_group_id
AND pbg.business_group_id = 81
AND TRUNC (SYSDATE) BETWEEN paaf.effective_start_date
AND paaf.effective_end_date
AND papf.employee_number IN
(SELECT flv.meaning
FROM fnd_lookup_values flv,
fnd_lookup_types_tl fltt
WHERE flv.description IN
('FYI-Air Ticket Inside Oman',
'FYI-Air Ticket Inside
Oman_9',
'FYI-Air Ticket Inside
Oman_100',
'FYI-Air Ticket Inside
Oman_88',
'Payroll Section_180',
'Payroll Section_298',
'Payroll Section')
AND TRUNC (SYSDATE) BETWEEN NVL (

flv.start_date_active,

TRUNC(SYSDATE)
)
AND NVL (

flv.end_date_active,

TRUNC(SYSDATE)
)
AND flv.lookup_type =
fltt.lookup_type
AND fltt.lookup_type =
'XXSSDC_HRSSA_APPROVERS'
AND fltt.LANGUAGE =
flv.LANGUAGE
AND fltt.LANGUAGE =
USERENV ('LANG')))
WHERE ranking = p_rank;

Select request_id,
req.CONCURRENT_PROGRAM_ID,
prog.DESCRIPTION,
Request_date, printer,
number_of_copies,
usr.user_name
from fnd_concurrent_requests req,
fnd_concurrent_programs_tl prog,
fnd_user usr
--where printer <> 'noprint'
--and requested_start_date > '14-AUG-06'
where status_code = 'C'
--and number_of_copies > 0
and prog.CONCURRENT_PROGRAM_ID = req.CONCURRENT_PROGRAM_ID
and prog.language = 'US'
and req.requested_by = usr.user_id
and request_id in (1775756,1775757,1775843)
order by request_date desc

S-ar putea să vă placă și