The following lines contain the word 'select', 'insert', 'update' or 'delete':
select aerh.receipts_status,
aerh.receipts_received_date,
aerh2.receipts_status parent_receipts_status
from AP_EXPENSE_REPORT_HEADERS_ALL aerh,
AP_EXPENSE_REPORT_HEADERS_ALL aerh2
where aerh.report_header_id = p_report_header_id
and aerh2.report_header_id(+) = aerh.shortpay_parent_id;
select aerl.receipt_required_flag,
aerl.receipt_missing_flag
from AP_EXPENSE_REPORT_LINES_ALL aerl,
AP_EXPENSE_REPORT_PARAMS_ALL erp
where aerl.report_header_id = p_report_header_id
and erp.parameter_id = aerl.web_parameter_id
and NVL(erp.expense_type_code,'NOT_DEFINED') not in ('PERSONAL','ROUNDING');
SELECT receipts_status INTO l_receipts_status
FROM ap_expense_report_headers_all WHERE report_header_id = p_report_header_id;
select aerh.*
from AP_EXPENSE_REPORT_HEADERS_ALL aerh
where aerh.report_header_id = p_report_header_id
FOR UPDATE OF REPORT_HEADER_ID NOWAIT;
select aerh.report_header_id
from AP_EXPENSE_REPORT_HEADERS_ALL aerh
where aerh.BOTHPAY_PARENT_ID = p_report_header_id
and holding_report_header_id is not null;
select aerh.report_header_id
from AP_EXPENSE_REPORT_HEADERS_ALL aerh
where aerh.report_header_id = l_report_header_id
and holding_report_header_id is not null
and NOT EXISTS (select 1
from ap_expense_report_lines_all aerl
where aerl.report_header_id = aerh.report_header_id
and aerl.credit_card_trx_id IS NULL);
UPDATE ap_expense_report_headers_all
SET image_receipts_status = l_new_status,
receipts_status = l_line_status
WHERE CURRENT OF header_cur;
UPDATE ap_expense_report_headers_all
SET image_receipts_status = l_new_status,
receipts_status = l_new_status
WHERE CURRENT OF header_cur;
UPDATE ap_expense_report_headers_all
SET receipts_status = l_new_status,
image_receipts_status = l_line_status
WHERE CURRENT OF header_cur;
UPDATE AP_EXPENSE_REPORT_HEADERS_ALL
SET receipts_received_date = null
WHERE CURRENT OF header_cur;
UPDATE AP_EXPENSE_REPORT_HEADERS_ALL
SET receipts_received_date = null, report_filing_number = null
WHERE CURRENT OF header_cur;
UPDATE AP_EXPENSE_REPORT_HEADERS_ALL
SET image_receipts_received_date = null
WHERE CURRENT OF header_cur;
UPDATE AP_EXPENSE_REPORT_HEADERS_ALL
SET image_receipts_received_date = null, receipts_received_date = null, report_filing_number = null
WHERE CURRENT OF header_cur;
UPDATE ap_expense_report_headers_all
SET receipts_status = l_temp_org_status,
image_receipts_status = l_temp_img_status
WHERE report_header_id = p_report_header_id;
select 1
from wf_items wf
where wf.item_type = 'APEXP'
and wf.item_key = to_char(p_report_header_id) -- Bug 6841589 (sodash) to solve the invalid number exception
and wf.end_date is null
and wf.root_activity = p_shortpay_type
and rownum = 1;
SELECT receipts_status, image_receipts_status INTO l_receipts_status, l_header_status
FROM ap_expense_report_headers_all WHERE report_header_id = p_report_header_id;
select 'Y'
into l_is_shortpay
from ap_expense_report_headers_all aerh,
wf_items wf
where aerh.report_header_id = p_report_header_id
and aerh.shortpay_parent_id is not null
and wf.item_type = 'APEXP'
and wf.item_key = to_char(aerh.report_header_id)
and wf.end_date is null
and wf.root_activity = p_shortpay_type
and rownum = 1;