SELECT
DISTINCT
A.BUSINESS_UNIT,
A.PROPOSAL_ID,
A.SUB_PROP_NBR,
A.BUDGET_ID,
C.BUDGET_PERIOD_GM,
A.VERSION_ID
FROM
PS_GM_BUD_PERIOD A,
PS_GM_BUD_HDR B,
PS_GM_BUD_PERIOD C,
PS_GM_BUD_HDR D
WHERE
B.INCL_IN_PROPOSAL='Y'
AND
A.BUSINESS_UNIT=B.BUSINESS_UNIT
AND
A.PROPOSAL_ID=B.PROPOSAL_ID
AND
A.VERSION_ID=B.VERSION_ID
AND
A.SUB_PROP_NBR=B.SUB_PROP_NBR
AND
A.BUDGET_ID=B.BUDGET_ID
AND
B.BUSINESS_UNIT=C.BUSINESS_UNIT
AND
B.PROPOSAL_ID=C.PROPOSAL_ID
AND
B.VERSION_ID=C.VERSION_ID
AND
B.SUB_PROP_NBR=C.SUB_PROP_NBR
AND
D.INCL_IN_PROPOSAL='Y'
AND
C.BUSINESS_UNIT=D.BUSINESS_UNIT
AND
C.PROPOSAL_ID=D.PROPOSAL_ID
AND
C.VERSION_ID=D.VERSION_ID
AND
C.SUB_PROP_NBR=D.SUB_PROP_NBR
AND
C.BUDGET_ID=D.BUDGET_ID
|