The following lines contain the word 'select', 'insert', 'update' or 'delete':
INSERT INTO hr_h2pi_message_lines
( to_business_group_id, request_id, from_id, table_name,
message_level, message_name_encoded, api_module_id)
VALUES ( hr_h2pi_upload.g_to_business_group_id, hr_h2pi_upload.g_request_id,
NVL(p_from_id, 0), p_table_name, UPPER(p_message_level),
nvl(l_message_name_encoded,p_message_text), p_api_module_id );
SELECT count(*)
INTO l_count
FROM hr_h2pi_message_lines
WHERE request_id = hr_h2pi_upload.g_request_id
AND message_level = 'FATAL';
SELECT message_name_encoded,
message_level,
api_module_id,
to_business_group_id,
request_id,
from_id,
table_name
FROM hr_h2pi_message_lines
WHERE to_business_group_id = hr_h2pi_upload.g_to_business_group_id
AND request_id = hr_h2pi_upload.g_request_id
GROUP BY to_business_group_id,
request_id,
table_name,
message_level,
message_name_encoded,
from_id,
api_module_id;
SELECT name
INTO l_to_business_group_name
FROM per_business_groups
WHERE business_group_id = hr_h2pi_upload.g_to_business_group_id;
SELECT last_name || ', ' || first_name
INTO l_person_name
FROM hr_h2pi_employees
WHERE person_id = csr_rec.from_id
--AND business_group_id = l_from_business_group_id
AND client_id = l_from_client_id
AND rownum < 2;
SELECT location_code
INTO l_location_name
FROM hr_h2pi_locations
WHERE location_id = csr_rec.from_id
--AND business_group_id = l_from_business_group_id;
SELECT name
INTO l_org_name
FROM hr_h2pi_hr_organizations
WHERE organization_id = csr_rec.from_id
--AND business_group_id = l_from_business_group_id;
SELECT assignment_number
INTO l_assignment_number
FROM hr_h2pi_assignments
WHERE assignment_id = csr_rec.from_id
-- AND business_group_id = l_from_business_group_id
AND client_id = l_from_client_id
AND rownum < 2;
SELECT asg.assignment_number,
et.element_name
INTO l_assignment_number,
l_element_name
FROM hr_h2pi_element_entries ee,
hr_h2pi_id_mapping map,
hr_h2pi_id_mapping map2,
pay_element_links_f el,
pay_element_types_f et,
hr_h2pi_assignments_v asg
WHERE ee.element_entry_id = csr_rec.from_id
--AND ee.business_group_id = l_from_business_group_id
AND ee.client_id = l_from_client_id
AND ee.element_link_id = map.from_id
AND map.table_name = 'PAY_ELEMENT_LINKS_F'
AND map.to_business_group_id = csr_rec.to_business_group_id
AND map.to_id = el.element_link_id
AND el.element_type_id = et.element_type_id
AND ee.assignment_id = map2.from_id
AND map2.table_name = 'PER_ALL_ASSIGNMENTS_F'
AND map2.to_business_group_id = csr_rec.to_business_group_id
AND map2.to_id = asg.assignment_id
AND ee.effective_start_date between el.effective_start_date
and el.effective_end_date
AND el.effective_start_date between et.effective_start_date
and et.effective_end_date
AND ee.effective_start_date between asg.effective_start_date
and asg.effective_end_date
AND rownum < 2;
SELECT assignment_number
INTO l_assignment_number
FROM hr_h2pi_salaries sal,
hr_h2pi_assignments_v asg,
hr_h2pi_id_mapping map
WHERE sal.pay_proposal_id = csr_rec.from_id
--AND sal.business_group_id = l_from_business_group_id
AND sal.client_id = l_from_client_id
AND sal.assignment_id = map.from_id
AND map.table_name = 'PER_ALL_ASSIGNMENTS_F'
AND map.to_business_group_id = csr_rec.to_business_group_id
AND map.to_id = asg.assignment_id
AND asg.business_group_id = csr_rec.to_business_group_id
AND sal.change_date between asg.effective_start_date
and asg.effective_end_date
AND rownum < 2;
SELECT asg.assignment_number,
opm.org_payment_method_name
INTO l_assignment_number,
l_pay_method_name
FROM hr_h2pi_payment_methods ppm,
hr_h2pi_org_payment_methods opm,
hr_h2pi_assignments_v asg,
hr_h2pi_id_mapping map
WHERE personal_payment_method_id = csr_rec.from_id
--AND ppm.business_group_id = l_from_business_group_id
AND ppm.client_id = l_from_client_id
AND ppm.business_group_id = opm.business_group_id
AND ppm.org_payment_method_id = opm.org_payment_method_id
AND asg.business_group_id = csr_rec.to_business_group_id
AND ppm.assignment_id = map.from_id
AND map.table_name = 'PER_ALL_ASSIGNMENTS_F'
AND map.to_id = asg.assignment_id
AND ppm.effective_start_date between opm.effective_start_date
and opm.effective_end_date
AND ppm.effective_start_date between asg.effective_start_date
and asg.effective_end_date
AND rownum < 2;
SELECT ogs.name,
ogc.org_information1
INTO l_org_name,
l_org_classification
FROM hr_h2pi_organization_class ogc,
hr_h2pi_hr_organizations_v ogs,
hr_h2pi_id_mapping map
WHERE ogc.org_information_id = csr_rec.from_id
--AND ogc.business_group_id = l_from_business_group_id
AND ogc.client_id = l_from_client_id
AND ogc.organization_id = map.from_id
AND map.table_name = 'HR_ALL_ORGANIZATION_UNITS'
AND ogs.business_group_id = csr_rec.to_business_group_id
AND map.to_id = ogs.organization_id
AND rownum < 2;
SELECT name,
org_information_context
INTO l_org_name,
l_context
FROM hr_h2pi_organization_info ogi,
hr_h2pi_hr_organizations_v ogs,
hr_h2pi_id_mapping map
WHERE org_information_id = csr_rec.from_id
--AND ogi.business_group_id = l_from_business_group_id
AND ogi.client_id = l_from_client_id
AND ogi.organization_id = map.from_id
AND map.table_name = 'HR_ALL_ORGANIZATION_UNITS'
AND ogs.business_group_id = csr_rec.to_business_group_id
AND map.to_id = ogs.organization_id
AND rownum < 2;
SELECT bg.name,
ogi.org_information_context
INTO l_org_name,
l_context
FROM hr_h2pi_organization_info ogi,
hr_h2pi_bg_and_gre bg
WHERE ogi.org_information_id = csr_rec.from_id
--AND ogi.business_group_id = l_from_business_group_id
AND ogi.client_id = l_from_client_id
AND ogi.business_group_id = bg.business_group_id
AND ogi.organization_id = bg.organization_id
AND rownum < 2;
SELECT em.last_name || ', ' || em.first_name
INTO l_person_name
FROM hr_h2pi_addresses ad,
hr_h2pi_employees_v em,
hr_h2pi_id_mapping map
WHERE ad.address_id = csr_rec.from_id
--AND ad.business_group_id = l_from_business_group_id
AND ad.client_id = l_from_client_id
AND em.business_group_id = csr_rec.to_business_group_id
AND ad.person_id = map.from_id
AND map.table_name = 'PER_ALL_PEOPLE_F'
AND map.to_id = em.person_id
AND rownum < 2;
SELECT asg.assignment_number
INTO l_assignment_number
FROM hr_h2pi_federal_tax_rules ftr,
hr_h2pi_assignments_v asg,
hr_h2pi_id_mapping map
WHERE ftr.emp_fed_tax_rule_id = csr_rec.from_id
--AND ftr.business_group_id = l_from_business_group_id
AND ftr.client_id = l_from_client_id
AND asg.business_group_id = csr_rec.to_business_group_id
AND ftr.assignment_id = map.from_id
AND map.table_name = 'PER_ALL_ASSIGNMENTS_F'
AND map.to_id = asg.assignment_id
AND rownum < 2;
SELECT asg.assignment_number
INTO l_assignment_number
FROM hr_h2pi_state_tax_rules str,
hr_h2pi_assignments_v asg,
hr_h2pi_id_mapping map
WHERE str.emp_state_tax_rule_id = csr_rec.from_id
--AND str.business_group_id = l_from_business_group_id
AND str.client_id = l_from_client_id
AND str.assignment_id = map.from_id
AND map.table_name = 'PER_ALL_ASSIGNMENTS_F'
AND map.to_id = asg.assignment_id
AND asg.business_group_id = csr_rec.to_business_group_id
AND rownum < 2;
SELECT asg.assignment_number
INTO l_assignment_number
FROM hr_h2pi_county_tax_rules ctr,
hr_h2pi_assignments_v asg,
hr_h2pi_id_mapping map
WHERE ctr.emp_county_tax_rule_id = csr_rec.from_id
--AND ctr.business_group_id = l_from_business_group_id
AND ctr.client_id = l_from_client_id
AND ctr.assignment_id = csr_rec.from_id
AND map.table_name = 'PER_ALL_ASSIGNMENTS_F'
AND map.to_id = asg.assignment_id
AND asg.business_group_id = csr_rec.to_business_group_id
AND rownum < 2;
SELECT asg.assignment_number
INTO l_assignment_number
FROM hr_h2pi_city_tax_rules ctr,
hr_h2pi_assignments_v asg,
hr_h2pi_id_mapping map
WHERE ctr.emp_city_tax_rule_id = csr_rec.from_id
--AND ctr.business_group_id = l_from_business_group_id
AND ctr.client_id = l_from_client_id
AND ctr.assignment_id = map.from_id
AND map.table_name = 'PER_ALL_ASSIGNMENTS_F'
AND map.to_id = asg.assignment_id
AND asg.business_group_id = csr_rec.to_business_group_id
AND rownum < 2;