1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| SELECT period_id, eac2, ca_short_name
FROM (
SELECT period_id, ca_short_name, eac2, wp_bo_number
FROM admuser.histo_tasksum
WHERE wp_bo_number = 'CA'
UNION
SELECT period_id, ca_short_name, eac2, wp_bo_number
FROM admuser.histo_tasksum
WHERE wp_bo_number = 'PC'
UNION
SELECT period_id, ca_short_name, eac2, wp_bo_number
FROM admuser.histo_tasksum
WHERE wp_bo_number = 'MR'
UNION
SELECT period_id, ca_short_name, eac2, wp_bo_number
FROM admuser.histo_tasksum
WHERE wp_bo_number = 'MC'
) histo JOIN
(
SELECT wbs_short_name
FROM admuser.projwbs
WHERE proj_node_flag = 'Y'
AND delete_date IS NULL
START WITH wbs_short_name IN ('P-01034')
CONNECT BY PRIOR wbs_id = parent_wbs_id
) pw ON histo.ca_short_name = pw.wbs_short_name |
Partager