The following lines contain the word 'select', 'insert', 'update' or 'delete':
select 1
from ahl_documents_b
where source_party_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_documents_b
set source_party_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where source_party_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_supplier_documents
where supplier_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_supplier_documents
set supplier_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where supplier_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_recipient_documents
where recipient_party_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_recipient_documents
set recipient_party_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where recipient_party_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_subscriptions_b
where requested_by_party_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_subscriptions_b
set requested_by_party_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where requested_by_party_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_subscriptions_b
where SUBSCRIBED_FRM_PARTY_ID = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_subscriptions_b
set SUBSCRIBED_FRM_PARTY_ID = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where SUBSCRIBED_FRM_PARTY_ID = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_doc_revisions_b
where approved_by_party_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_doc_revisions_b
set approved_by_party_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where approved_by_party_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_doc_revision_copies
where received_by_party_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_doc_revision_copies
set received_by_party_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where received_by_party_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_operations_b
where operator_party_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_operations_b
set operator_party_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where operator_party_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_operations_h_b
where operator_party_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_operations_h_b
set operator_party_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where operator_party_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_routes_b
where operator_party_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_routes_b
set operator_party_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where operator_party_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_routes_h_b
where operator_party_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_routes_h_b
set operator_party_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where operator_party_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');
select 1
from ahl_osp_orders_b
where customer_id = p_from_fk_id
for update nowait;
select merge_reason_code
into l_merge_reason_code
from hz_merge_batch
where batch_id = p_batch_id;
-- obtain lock on records to be updated.
arp_message.set_name('AR', 'AR_LOCKING_TABLE');
update ahl_osp_orders_b
set customer_id = p_to_fk_id,
last_update_date = SYSDATE,
last_updated_by = G_USER_ID,
last_update_login = G_LOGIN_ID
where customer_id = p_from_fk_id;
arp_message.set_name('AR', 'AR_ROWS_UPDATED');