The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE deleteViolationEntry(
p_report_header_id IN AP_EXPENSE_REPORT_HEADERS.report_header_id%TYPE) IS
-------------------------------------------------------------------------------
l_debug_info VARCHAR2(200);
DELETE
FROM ap_pol_violations
WHERE report_header_id = p_report_header_id;
AP_WEB_DB_UTIL_PKG.RaiseException('deleteViolationEntry');
END deleteViolationEntry;
FUNCTION updateViolationsHeaderId(
p_ReportHeaderID IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE,
p_newReportHeaderID IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE)
RETURN BOOLEAN IS
--------------------------------------------------------------------------------
BEGIN
-- set the report_header_id for the line
UPDATE ap_pol_violations
SET report_header_id = p_newReportHeaderID
WHERE report_header_id = p_ReportHeaderID
AND distribution_line_number IN(
SELECT distribution_line_number
FROM ap_expense_report_lines
WHERE report_header_id = p_newReportHeaderID);
AP_WEB_DB_UTIL_PKG.RaiseException('updateViolationsHeaderId');
END updateViolationsHeaderId;
UPDATE ap_pol_violations
SET report_header_id = p_new_report_header_id
WHERE distribution_line_number IN
(select distribution_line_number
from ap_expense_report_lines
where report_header_id = p_new_report_header_id
and ( nvl(policy_shortpay_flag,'N') = 'Y'
or
(itemization_parent_id in
(select report_line_id
from ap_expense_report_lines
where report_header_id = p_new_report_header_id
and nvl(policy_shortpay_flag,'N') = 'Y'
and itemization_parent_id = -1
)
)
))
AND report_header_id = p_orig_expense_report_id;
UPDATE ap_pol_violations
SET report_header_id = p_new_report_header_id
WHERE distribution_line_number IN
(select distribution_line_number
from ap_expense_report_lines
where report_header_id = p_new_report_header_id
and ((receipt_required_flag = 'Y'
and nvl(receipt_verified_flag,'N') = 'N'
and nvl(policy_shortpay_flag, 'N') = 'N'
)
or
(itemization_parent_id in
(select report_line_id
from ap_expense_report_lines
where report_header_id = p_new_report_header_id
and receipt_required_flag = 'Y'
and nvl(receipt_verified_flag,'N') = 'N'
and nvl(policy_shortpay_flag, 'N') = 'N'
and itemization_parent_id = -1
)
)
))
AND report_header_id = p_orig_expense_report_id;
UPDATE ap_pol_violations
SET report_header_id = p_new_report_header_id
WHERE distribution_line_number IN
(SELECT distribution_line_number
FROM ap_expense_report_lines
WHERE report_header_id = p_orig_expense_report_id
AND credit_card_trx_id IS NOT NULL)
AND report_header_id = p_orig_expense_report_id;