The following lines contain the word 'select', 'insert', 'update' or 'delete':
select orig_system_reference, party_id, created_by, nvl(created_by_module,'TCA'),
nvl(application_id,'222'), creation_date,last_updated_by, last_update_date, nvl(last_update_login,-1)
from hz_parties party where orig_system_reference is not null and status in ('A','I')
and not exists(select 'X' from hz_orig_sys_references osr
where party.party_id = osr.owner_table_id
and osr.owner_table_name = 'HZ_PARTIES'
and osr.orig_system = 'UNKNOWN'
and party.orig_system_reference =
osr.orig_system_reference
and osr.status = 'A')
and not exists(select 'N' from hz_orig_sys_mapping where owner_table_name='HZ_PARTIES' and multiple_flag='N' and orig_system='UNKNOWN');
select orig_system_reference, location_id, created_by, nvl(created_by_module,'TCA'),
nvl(application_id,'222'), creation_date,last_updated_by, last_update_date, nvl(last_update_login,-1)
from hz_locations locations where orig_system_reference is not null
and not exists(select 'X' from hz_orig_sys_references osr
where locations.location_id = osr.owner_table_id
and osr.owner_table_name = 'HZ_LOCATIONS'
and osr.orig_system = 'UNKNOWN'
and locations.orig_system_reference =
osr.orig_system_reference
and osr.status = 'A')
and not exists(select 'N' from hz_orig_sys_mapping where owner_table_name='HZ_LOCATIONS' and multiple_flag='N' and orig_system='UNKNOWN');
select orig_system_reference, org_contact_id, created_by, nvl(created_by_module,'TCA'),
nvl(application_id,'222'), creation_date,last_updated_by, last_update_date, nvl(last_update_login,-1)
from hz_org_contacts org_contacts where orig_system_reference is not null and status in ('A','I')
and not exists(select 'X' from hz_orig_sys_references osr
where org_contacts.org_contact_id = osr.owner_table_id
and osr.owner_table_name = 'HZ_ORG_CONTACTS'
and osr.orig_system = 'UNKNOWN'
and org_contacts.orig_system_reference =
osr.orig_system_reference
and osr.status = 'A')
and not exists(select 'N' from hz_orig_sys_mapping where owner_table_name='HZ_ORG_CONTACTS' and multiple_flag='N' and orig_system='UNKNOWN');
select /*+ parallel(contact) */ orig_system_reference, contact_point_id, created_by, nvl(created_by_module,'TCA'),
nvl(application_id,'222'), creation_date,last_updated_by, last_update_date, nvl(last_update_login,-1)
from hz_contact_points contact where orig_system_reference is not null and status in ('A','I')
and not exists(select /*+ parallel(osr) */ 'X' from hz_orig_sys_references osr
where contact.contact_point_id = osr.owner_table_id
and osr.owner_table_name = 'HZ_CONTACT_POINTS'
and osr.orig_system = 'UNKNOWN'
and contact.orig_system_reference =
osr.orig_system_reference
and osr.status = 'A')
and not exists(select 'N' from hz_orig_sys_mapping where owner_table_name='HZ_CONTACT_POINTS' and multiple_flag='N' and orig_system='UNKNOWN');
select /*+ parallel(contact_roles) */ orig_system_reference, org_contact_role_id, created_by, nvl(created_by_module,'TCA'),
nvl(application_id,'222'), creation_date,last_updated_by, last_update_date, nvl(last_update_login,-1)
from hz_org_contact_roles contact_roles where orig_system_reference is not null and status in ('A','I')
and not exists(select /*+ parallel(osr) */ 'X' from hz_orig_sys_references osr
where contact_roles.org_contact_role_id = osr.owner_table_id
and osr.owner_table_name = 'HZ_ORG_CONTACT_ROLES'
and osr.orig_system = 'UNKNOWN'
and contact_roles.orig_system_reference =
osr.orig_system_reference
and osr.status = 'A')
and not exists(select 'N' from hz_orig_sys_mapping where owner_table_name='HZ_ORG_CONTACT_ROLES' and multiple_flag='N' and orig_system='UNKNOWN');
select orig_system_reference, party_site_id, created_by, nvl(created_by_module,'TCA'),
nvl(application_id,'222'), creation_date,last_updated_by, last_update_date, nvl(last_update_login,-1)
from hz_party_sites party_sites where orig_system_reference is not null and status in ('A','I')
and not exists(select 'X' from hz_orig_sys_references osr
where party_sites.party_site_id = osr.owner_table_id
and osr.owner_table_name = 'HZ_PARTY_SITES'
and osr.orig_system = 'UNKNOWN'
and party_sites.orig_system_reference =
osr.orig_system_reference
and osr.status = 'A')
and not exists(select 'N' from hz_orig_sys_mapping where owner_table_name='HZ_PARTY_SITES' and multiple_flag='N' and orig_system='UNKNOWN');
Type last_updated_by_type is TABLE of HZ_ORIG_SYS_REFERENCES.last_updated_by%TYPE;
Type last_update_date_type is TABLE of HZ_ORIG_SYS_REFERENCES.last_update_date%TYPE;
Type last_update_login_type is TABLE of HZ_ORIG_SYS_REFERENCES.last_update_login%TYPE;
last_updated_by last_updated_by_type;
last_update_date last_update_date_type;
last_update_login last_update_login_type;
appl_id, creation_date, last_updated_by, last_update_date,
last_update_login limit l_limit_rows;
insert into hz_orig_sys_references
(orig_system_ref_id, orig_system, orig_system_reference, owner_table_name, owner_table_id,
status, start_date_active, end_date_active, reason_code, created_by,
old_orig_system_reference, created_by_module, application_id, creation_date, last_updated_by,
last_update_date,last_update_login, object_version_number)
values(hz_orig_system_ref_s.nextval,'UNKNOWN', orig_sys_ref(i), 'HZ_PARTIES', party_id(i),
'A', sysdate, null, null, created_by(i), null, created_by_module(i), appl_id(i),
creation_date(i), last_updated_by(i), last_update_date(i),
last_update_login(i), 1);
appl_id, creation_date, last_updated_by, last_update_date,
last_update_login limit l_limit_rows;
insert into hz_orig_sys_references
(orig_system_ref_id, orig_system, orig_system_reference, owner_table_name, owner_table_id,
status, start_date_active, end_date_active, reason_code, created_by,
old_orig_system_reference, created_by_module, application_id, creation_date, last_updated_by,
last_update_date,last_update_login, object_version_number)
values(hz_orig_system_ref_s.nextval,'UNKNOWN', orig_sys_ref(i), 'HZ_LOCATIONS', location_id(i),
'A', sysdate, null, null, created_by(i), null, created_by_module(i), appl_id(i),
creation_date(i), last_updated_by(i), last_update_date(i), last_update_login(i), 1);
appl_id, creation_date, last_updated_by, last_update_date,
last_update_login limit l_limit_rows;
insert into hz_orig_sys_references
(orig_system_ref_id, orig_system, orig_system_reference, owner_table_name, owner_table_id,
status, start_date_active, end_date_active, reason_code, created_by,
old_orig_system_reference, created_by_module, application_id, creation_date, last_updated_by,
last_update_date,last_update_login, object_version_number)
values(hz_orig_system_ref_s.nextval,'UNKNOWN', orig_sys_ref(i), 'HZ_ORG_CONTACTS', org_contact_id(i),
'A', sysdate, null, null, created_by(i), null, created_by_module(i), appl_id(i), creation_date(i),
last_updated_by(i), last_update_date(i), last_update_login(i), 1);
appl_id, creation_date, last_updated_by, last_update_date,
last_update_login limit l_limit_rows;
insert into hz_orig_sys_references
(orig_system_ref_id, orig_system, orig_system_reference, owner_table_name, owner_table_id,
status, start_date_active, end_date_active, reason_code, created_by,
old_orig_system_reference, created_by_module, application_id, creation_date, last_updated_by,
last_update_date,last_update_login, object_version_number)
values(hz_orig_system_ref_s.nextval,'UNKNOWN', orig_sys_ref(i), 'HZ_CONTACT_POINTS', contact_point_id(i),
'A', sysdate, null, null, created_by(i), null, created_by_module(i), appl_id(i), creation_date(i), last_updated_by(i),
last_update_date(i), last_update_login(i), 1);
appl_id, creation_date, last_updated_by, last_update_date,
last_update_login limit l_limit_rows;
insert into hz_orig_sys_references
(orig_system_ref_id, orig_system, orig_system_reference, owner_table_name, owner_table_id,
status, start_date_active, end_date_active, reason_code, created_by,
old_orig_system_reference, created_by_module, application_id, creation_date, last_updated_by,
last_update_date,last_update_login, object_version_number)
values(hz_orig_system_ref_s.nextval,'UNKNOWN', orig_sys_ref(i), 'HZ_ORG_CONTACT_ROLES', org_contact_role_id(i),
'A', sysdate, null, null, created_by(i), null, created_by_module(i), appl_id(i), creation_date(i), last_updated_by(i),
last_update_date(i), last_update_login(i), 1);
appl_id, creation_date, last_updated_by, last_update_date,
last_update_login limit l_limit_rows;
insert into hz_orig_sys_references
(orig_system_ref_id, orig_system, orig_system_reference, owner_table_name, owner_table_id,
status, start_date_active, end_date_active, reason_code, created_by,
old_orig_system_reference, created_by_module, application_id, creation_date, last_updated_by,
last_update_date,last_update_login, object_version_number)
values(hz_orig_system_ref_s.nextval,'UNKNOWN', orig_sys_ref(i), 'HZ_PARTY_SITES', party_site_id(i),
'A', sysdate, null, null, created_by(i), null, created_by_module(i), appl_id(i), creation_date(i),
last_updated_by(i), last_update_date(i), last_update_login(i), 1);