You are on page 1of 1

select week_ending,actual_fte,planned_fte,forecast_fte,sum( PLANNED_FTE) OVER ( order by end_date) cum_planned_fte,sum( actual_fte) OVER (order by end_date) c um_actual_fte, sum( forecast_fte) OVER

(order by end_date) cum_forecast_fte from (SELECT gl.period_name week_ending,gl.end_date end_date, (SELECT SUM (NVL (ta.tot_billable_labor_hours, 0)) FROM pa_resource_accum_details rad, pa_txn_accum ta, pa_projects_all pp WHERE rad.txn_accum_id = ta.txn_accum_id AND ta.PA_PERIOD = gl.period_name AND ta.project_id = pp.project_id AND pp.project_id = :p_project_number) actual_fte, ( select sum(pbl.DISPLAY_QUANTITY) from pa_budget_types pbt,PA_FIN_PLA N_TYPES_B pfpt , PA_BUDGET_VERSIONS pbv,pa_budget_lines pbl ,pa_projects_all pp where budget_type='Approved Revenue Budget' and pfpt.MIGRATED_FRM_BDGT_TYP_CODE=pbt. BUDGET_TYPE_CODE and pfpt.FIN_PLAN_TYPE_ID=pbv.FIN_PLAN_TYPE_ID and pbv.BUDGET_STATUS_CODE='B' and pbv.budget_version_id=pbl.budget_version_id and pp.project_id=pbv.project_id AND pp.project_id = :p_project_number and pbl.period_name= gl.period_name) planned_fte, ( select sum(pbl.DISPLAY_QUANTITY) from pa_budget_types pbt,PA_FIN_PLA N_TYPES_B pfpt , PA_BUDGET_VERSIONS pbv,pa_budget_lines pbl ,pa_projects_all pp where budget_type='Forecast Revenue Budget' and pfpt.MIGRATED_FRM_BDGT_TYP_CODE=pbt. BUDGET_TYPE_CODE and pfpt.FIN_PLAN_TYPE_ID=pbv.FIN_PLAN_TYPE_ID -- and pbv.BUDGET_STATUS_CODE='B' and pbv.budget_version_id=pbl.budget_version_id and pp.project_id=pbv.project_id AND pp.project_id = :p_project_number and pbl.period_name= gl.period_name) forecast_fte FROM gl_periods gl WHERE period_type = 'Week' AND :p_wk_st_dt <= start_date AND :p_wk_end_dt >= en d_date)

You might also like