The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT aeh.week_end_date, aeh.employee_id, flex_concatenated
INTO l_week_end_date, l_employee_id, l_cost_center
FROM ap_expense_report_headers_all aeh
WHERE report_header_id = p_report_header_id;
select count(distinct award_id), count(distinct nvl(award_id, -1)),
count(distinct project_id), count(distinct nvl(project_id, -1))
into l_num_of_distinct_awards, l_num_of_awards, l_num_of_distinct_projects, l_num_of_projects
from ap_exp_report_dists_all dist
where report_header_id = p_report_header_id
and report_line_id not in (
select report_line_id
from ap_expense_report_lines_all line
where line.report_header_id = dist.report_header_id
and web_parameter_id in (l_personalParameterId, l_roundingParameterId));
select distinct award_id
into l_award_id
from ap_exp_report_dists_all dist
where report_header_id = p_report_header_id
and report_line_id not in (
select report_line_id
from ap_expense_report_lines_all line
where line.report_header_id = dist.report_header_id
and web_parameter_id in (l_personalParameterId, l_roundingParameterId));
select distinct project_id
into l_project_id
from ap_exp_report_dists_all dist
where report_header_id = p_report_header_id
and report_line_id not in (
select report_line_id
from ap_expense_report_lines_all line
where line.report_header_id = dist.report_header_id
and web_parameter_id in (l_personalParameterId, l_roundingParameterId));
SELECT GS.chart_of_accounts_id
INTO l_char_of_accounts_id
FROM ap_system_parameters_all S,
gl_sets_of_books GS,
ap_expense_report_headers_all erh
WHERE GS.set_of_books_id = S.set_of_books_id
AND S.org_id = erh.org_id
AND erh.report_header_id = p_report_header_id;
l_query_stmt := 'SELECT DISTINCT HOIP.ATTRIBUTE2 business_manager_id
FROM GL_CODE_COMBINATIONS GLCC,
HR_ORGANIZATION_INFORMATION HOIP,
HR_ORGANIZATION_INFORMATION HOIC,
HR_ORGANIZATION_INFORMATION HOI,
PER_WORKFORCE_CURRENT_X PP
WHERE ENABLED_FLAG = ''Y''
AND GLCC.' || l_segment_name || ' = :costCenter
AND CHART_OF_ACCOUNTS_ID = :charOfAccountsId
AND COMPANY_COST_CENTER_ORG_ID IS NOT NULL
AND HOI.ORG_INFORMATION_CONTEXT = ''CLASS''
AND HOI.ORG_INFORMATION1 = ''CC''
AND HOIC.ORGANIZATION_ID = HOI.ORGANIZATION_ID
AND UPPER(HOIC.ORG_INFORMATION_CONTEXT) = ''COMPANY COST CENTER''
AND GLCC.COMPANY_COST_CENTER_ORG_ID = HOIC.ORGANIZATION_ID
AND HOIC.ORGANIZATION_ID = HOIP.ORGANIZATION_ID
AND UPPER(HOIP.ORG_INFORMATION_CONTEXT) = ''ORGANIZATION NAME ALIAS''
AND PP.PERSON_ID = HOIP.ATTRIBUTE2';
SELECT employee_id, flex_concatenated
INTO l_employee_id, l_cost_center
FROM AP_EXPENSE_REPORT_HEADERS_ALL
WHERE report_header_id = p_report_header_id;
select employee_id into l_employee_id
from ap_expense_report_headers_all
where report_header_id = p_report_header_id;
select override_approver_id, employee_id
into l_override_approver_id, l_employee_id
from ap_expense_report_headers_all
where report_header_id = p_report_header_id;