The following lines contain the word 'select', 'insert', 'update' or 'delete':
select a.cost_weighted_score
,b.pc_inv_crit_score_target_from
,b.pc_inv_crit_score_target_to
into l_sce_wscore
,l_pc_wscore_from
,l_pc_wscore_to
from fpa_aw_sce_str_scores_v a
,fpa_aw_pc_inv_criteria_v b
where a.investment_criteria = b.investment_criteria
and b.investment_criteria = 3
and a.planning_cycle = b.planning_cycle
and a.planning_cycle = p_pc_id
and a.scenario = p_scenario_id;
select nvl(b.net_present_value,0)
,c.financial_target_from
,c.financial_target_to
into l_sce_npv
,l_pc_npv_from
,l_pc_npv_to
from fpa_aw_sces_v a
,fpa_aw_sce_npvs_v b
,fpa_aw_pc_financial_targets_v c
where a.scenario = b.scenario
and b.scenario = p_scenario_id
and a.planning_cycle = c.planning_cycle
and a.planning_cycle = p_pc_id
and c.financial_metrics = 'NPV';
select nvl(b.return_on_inv,0)
,c.financial_target_from
,c.financial_target_to
into l_sce_roi
,l_pc_roi_from
,l_pc_roi_to
from fpa_aw_sces_v a
,fpa_aw_sce_fin_metrics_v b
,fpa_aw_pc_financial_targets_v c
where a.scenario = b.scenario
and b.scenario = p_scenario_id
and a.planning_cycle = c.planning_cycle
and a.planning_cycle = p_pc_id
and c.financial_metrics = 'ROI';
select pc_status
into l_pc_status
from fpa_aw_pc_info_v
where planning_cycle = p_pc_id;
select count(c.org_structure_element_id)
into l_org_count
from per_org_structure_elements c,
per_organization_structures d
where d.organization_structure_id = fnd_profile.VALUE('PJP_ORGANIZATION_HIERARCHY')
and c.business_group_id = d.business_group_id
and c.org_structure_element_id = p_org_id;
select count(portfolio)
into l_count
from fpa_aw_portf_headers_v
where portfolio_class_code = p_class_code;
select count(portfolio)
into l_count
from fpa_aw_portf_headers_v
where portfolio_class_code = p_class_code
and portfolio_organization is null;
select count(portfolio)
into l_count
from fpa_aw_portf_headers_v
where portfolio_class_code = p_class_code
and portfolio_organization in (
SELECT e.organization_id_child
FROM per_org_structure_elements e
,PER_ORG_STRUCTURE_VERSIONS v
WHERE e.org_structure_version_id = v.ORG_STRUCTURE_VERSION_ID
and v.ORGANIZATION_STRUCTURE_ID = FND_PROFILE.VALUE('PJP_ORGANIZATION_HIERARCHY')
AND (TRUNC(SYSDATE) BETWEEN TRUNC(v.DATE_FROM) AND TRUNC(nvl(v.DATE_TO, sysdate)))
CONNECT BY PRIOR e.organization_id_child = e.organization_id_parent
AND PRIOR e.org_structure_version_id = v.ORG_STRUCTURE_VERSION_ID
START WITH e.organization_id_child = p_org_id
UNION
SELECT e.organization_id_parent
FROM per_org_structure_elements e
,PER_ORG_STRUCTURE_VERSIONS v
WHERE e.org_structure_version_id = v.ORG_STRUCTURE_VERSION_ID
and v.ORGANIZATION_STRUCTURE_ID = FND_PROFILE.VALUE('PJP_ORGANIZATION_HIERARCHY')
AND (TRUNC(SYSDATE) BETWEEN TRUNC(v.DATE_FROM) AND TRUNC(nvl(v.DATE_TO, sysdate)))
CONNECT BY PRIOR e.organization_id_parent = e.organization_id_child
AND PRIOR e.org_structure_version_id = v.ORG_STRUCTURE_VERSION_ID
START WITH e.organization_id_child = p_org_id
UNION
SELECT e.organization_id_parent
FROM per_org_structure_elements e
,PER_ORG_STRUCTURE_VERSIONS v
WHERE e.org_structure_version_id = v.ORG_STRUCTURE_VERSION_ID
and v.ORGANIZATION_STRUCTURE_ID = FND_PROFILE.VALUE('PJP_ORGANIZATION_HIERARCHY')
AND (TRUNC(SYSDATE) BETWEEN TRUNC(v.DATE_FROM) AND TRUNC(nvl(v.DATE_TO, sysdate)))
CONNECT BY PRIOR e.organization_id_parent = e.organization_id_child
AND PRIOR e.org_structure_version_id = v.ORG_STRUCTURE_VERSION_ID
START WITH e.organization_id_parent = p_org_id
);
select count(portfolio)
into l_count
from fpa_aw_portf_headers_v
where portfolio_organization is not null
and portfolio_organization = p_org_id;
select 'VALID' from fpa_aw_pc_info_v
where calendar_name = p_calendar_name
and period_type = p_period_type and pc_status <> 'CREATED' and rownum < 2;
dbms_aw.execute('UPDATE');
select count(scenario) into l_scenario_count
from fpa_aw_sce_info_v
where planning_cycle = p_planning_cycle_id
and recommended_flag = 1;
select count(scenario) into l_scenario_count
from fpa_aw_sce_info_v
where planning_cycle = p_planning_cycle_id
and approved_flag = 1;
select class_category from pa_class_categories pac, fpa_aw_pc_info_v pci
where pac.class_category_id = pci.pc_category
and pci.planning_cycle = p_planning_cycle_id;
select pe.full_name
from
pa_project_parties ppp, pa_project_role_types par , fnd_menu_entries fndm ,fnd_form_functions fndf,
per_all_people_f pe, per_all_assignments_f prd
where
ppp.object_type = 'PJP_PORTFOLIO' and ppp.object_id = p_portfolio_id
and ppp.PROJECT_ROLE_ID = par.project_role_id
and par.menu_id = fndm.menu_id
and fndm.function_id = fndf.function_id
and fndf.function_name = 'FPA_SEC_APPROVE_PC'
and ppp.resource_type_id = 101
AND ppp.resource_source_id = pe.person_id
AND trunc(sysdate) BETWEEN trunc(ppp.start_date_active) AND trunc(NVL(ppp.end_date_active,sysdate))
AND trunc(sysdate) BETWEEN trunc(pe.effective_start_date) AND trunc(pe.effective_end_date)
AND ppp.resource_source_id = prd.person_id
AND prd.primary_flag = 'Y'
AND prd.assignment_type = 'E'
AND trunc(sysdate) BETWEEN trunc(prd.effective_start_date) AND trunc(prd.effective_end_date)
AND par.language = userenv('LANG')
AND par.project_role_type = 'PORTFOLIO_APPROVER';
select NVL(currency_code,NULL) into l_unit from fpa_aw_pc_info_v
where planning_cycle = p_planning_cycle_id;
select NVL(meaning,NULL) into l_unit from fpa_lookups_V
where lookup_type ='FPA_UNITS'
AND lookup_code = decode(p_metric_code, 'IRR', 'PERCENT','PAYBACKPERIOD', 'MONTHS');