SELECT pha.segment1,
pha.authorization_status,
pha.creation_date,
pha.last_update_date,
(SELECT pa.segment1
FROM apps.pa_projects_all pa
WHERE pa.project_id = pda.project_id) project_name,
(SELECT task_name
FROM apps.pa_tasks pt
WHERE pt.project_id = pda.project_id
AND pt.task_id = pda.task_id) task_name
FROM apps.po_headers_all pha,
apps.po_lines_all pla,
apps.po_distributions_all pda
WHERE pha.po_header_id = pla.po_header_id
AND pla.po_line_id = pda.po_line_id
AND pha.last_update_date > sysdate - 60
AND pha.authorization_status IN ( 'IN PROCESS', 'REJECTED' )
ORDER BY last_update_date DESC
pha.authorization_status,
pha.creation_date,
pha.last_update_date,
(SELECT pa.segment1
FROM apps.pa_projects_all pa
WHERE pa.project_id = pda.project_id) project_name,
(SELECT task_name
FROM apps.pa_tasks pt
WHERE pt.project_id = pda.project_id
AND pt.task_id = pda.task_id) task_name
FROM apps.po_headers_all pha,
apps.po_lines_all pla,
apps.po_distributions_all pda
WHERE pha.po_header_id = pla.po_header_id
AND pla.po_line_id = pda.po_line_id
AND pha.last_update_date > sysdate - 60
AND pha.authorization_status IN ( 'IN PROCESS', 'REJECTED' )
ORDER BY last_update_date DESC
Comments
Post a Comment