The following lines contain the word 'select', 'insert', 'update' or 'delete':
p_LastUpdatedBy IN NUMBER,
p_LastUpdateDate IN DATE,
p_lastUpdateLogin IN NUMBER ) IS
BEGIN
UPDATE ar_dispute_history
SET end_date = nvl(p_DisputeDate,
greatest(p_OldDisputeDate, sysdate))
WHERE payment_schedule_id = p_PaymentScheduleId
AND end_date IS NULL;
INSERT INTO ar_dispute_history (
dispute_history_id,
payment_schedule_id,
amount_in_dispute,
amount_due_remaining,
dispute_amount,
start_date,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login )
VALUES (
ar_dispute_history_s.nextval,
p_OldPaymentScheduleId,
NVL(p_AmountInDispute, 0),
p_AmountDueRemaining,
DECODE(p_OldAmountInDispute, NULL, NVL(p_AmountInDispute,0),
(NVL(p_AmountInDispute,0) - p_OldAmountInDispute)),
nvl(p_DisputeDate, greatest(p_OldDisputeDate, sysdate)),
p_CreatedBy,
p_CreationDate,
p_LastUpdatedBy,
p_LastUpdateDate,
p_lastUpdateLogin );