The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT org_id
FROM ozf_resale_batches_all
WHERE resale_batch_id = p_id;
SELECT *
FROM ozf_resale_lines_int
WHERE status_code =OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_OPEN
AND resale_batch_id = p_id;
SELECT NVL(batch_count,0)
FROM ozf_resale_batches
WHERE resale_batch_id = pc_batch_id;
SELECT count(1)
FROM ozf_resale_lines_int
WHERE status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED
AND resale_batch_id = p_id;
SELECT count(1)
FROM ozf_resale_lines_int
WHERE status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED
AND resale_batch_id = p_id;
DELETE FROM ozf_resale_logs_all
WHERE resale_id_type = 'BATCH'
AND resale_id = p_resale_batch_id;
update ozf_resale_lines_int
set dispute_code = null
where resale_batch_id = p_resale_batch_id
and status_code= OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_OPEN;
update ozf_resale_lines_int
set status_code= OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_PROCESSED
where resale_batch_id = p_resale_batch_id
and status_code= OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_OPEN
and tracing_flag = 'T';
OZF_RESALE_COMMON_PVT.Update_Duplicates (
p_api_version => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_commit => FND_API.G_FALSE,
p_validation_level => FND_API.G_VALID_LEVEL_FULL,
p_resale_batch_id => p_resale_batch_id,
p_resale_batch_type => l_batch_type,
p_batch_status => l_batch_status,
x_batch_status => l_batch_status,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
update ozf_resale_batches_all
set status_code = OZF_RESALE_COMMON_PVT.G_BATCH_REJECTED
where resale_batch_id = p_resale_batch_id;
SELECT batch_number
FROM ozf_resale_batches
WHERE resale_batch_id = cv_batch_id;
SELECT resale_batch_id
FROM ozf_resale_batches
WHERE report_start_date >= p_start_date
AND report_end_date <= p_end_date
AND status_code = 'CLOSED';
SELECT resale_batch_id
FROM ozf_resale_batches
WHERE report_start_date >= p_start_date
AND report_end_date <= p_end_date
AND partner_cust_account_id = p_cust_account_id
AND status_code = 'CLOSED';
SELECT resale_batch_id
FROM ozf_resale_batches
WHERE partner_cust_account_id = cv_cust_account_id
AND status_code = 'CLOSED';
DELETE FROM ozf_resale_lines_int_all a
WHERE a.resale_batch_id IN (
SELECT b.resale_batch_id
FROM ozf_resale_batches b
WHERE b.purge_flag IS NULL
AND b.status_code = 'CLOSED'
);
UPDATE ozf_resale_batches
SET purge_flag = 'T'
WHERE purge_flag IS NULL
AND status_code = 'CLOSED';
DELETE FROM ozf_resale_lines_int_all a
WHERE a.data_source_code = p_data_source_code
AND a.resale_batch_id IN (
SELECT b.resale_batch_id
FROM ozf_resale_batches b
WHERE b.purge_flag IS NULL
AND b.status_code = 'CLOSED'
AND b.data_source_code = p_data_source_code
);
UPDATE ozf_resale_batches
SET purge_flag = 'T'
WHERE purge_flag IS NULL
AND status_code = 'CLOSED'
AND data_source_code = p_data_source_code;
DELETE FROM ozf_resale_lines_int_all a
WHERE a.resale_batch_id IN (
SELECT b.resale_batch_id
FROM ozf_resale_batches b
WHERE b.purge_flag IS NULL
AND b.resale_batch_id = p_resale_batch_id
AND b.status_code NOT IN ('CLOSED', 'PROCESSING', 'PENDING_PAYMENT')
);
DELETE FROM ozf_resale_batches_all
WHERE resale_batch_id = p_resale_batch_id
AND status_code NOT IN ('CLOSED', 'PROCESSING', 'PENDING_PAYMENT');
DELETE FROM ozf_resale_lines_int_all a
WHERE a.data_source_code = p_data_source_code
AND a.resale_batch_id IN (
SELECT b.resale_batch_id
FROM ozf_resale_batches b
WHERE b.purge_flag IS NULL
AND b.data_source_code = p_data_source_code
AND b.resale_batch_id = p_resale_batch_id
);
DELETE FROM ozf_resale_batches_all
WHERE resale_batch_id = p_resale_batch_id
AND data_source_code = p_data_source_code
AND status_code NOT IN ('CLOSED', 'PROCESSING', 'PENDING_PAYMENT');