The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT legislation_code
FROM per_business_groups
WHERE business_group_id = v_bg_id;
c_update_action_if_exists CONSTANT VARCHAR2 (1) := 'U'; --Update existing element entry
c_default_dt_effective_changes CONSTANT VARCHAR2 (1) := 'U'; --Update/Change Insert
IF (p_action_if_exists = c_update_action_if_exists)
THEN
IF (p_date_effective_changes IS NULL)
THEN -- Default p_date_effective_changes
l_date_effective_changes := c_default_dt_effective_changes;
SELECT 1
FROM pay_element_types_f pet, pay_element_classifications pec
WHERE pet.classification_id = pec.classification_id
AND pec.classification_name LIKE 'EXTERNAL REPORTING%'
AND pet.legislation_code = v_leg_cd
AND pet.element_name = v_element_name;
SELECT paa.assignment_number, pos.date_start, pos.final_process_date
FROM per_all_assignments_f paa, per_periods_of_service pos
WHERE paa.assignment_id = v_assg_id
AND paa.period_of_service_id = pos.period_of_service_id
AND v_effective_date BETWEEN paa.effective_start_date
AND paa.effective_end_date;
SELECT paa.assignment_id, pos.date_start, pos.final_process_date
FROM per_all_assignments_f paa, per_periods_of_service pos
WHERE paa.assignment_number = v_assg_nr
AND paa.period_of_service_id = pos.period_of_service_id
AND v_effective_date BETWEEN paa.effective_start_date
AND paa.effective_end_date
AND paa.business_group_id = v_bg_id;
SELECT paa.assignment_number, paa.assignment_id, pos.date_start,
pos.final_process_date
FROM per_all_assignments_f paa, per_periods_of_service pos
WHERE paa.person_id = v_person_id
AND paa.period_of_service_id = pos.period_of_service_id
AND v_effective_date BETWEEN paa.effective_start_date
AND paa.effective_end_date
AND paa.business_group_id = v_bg_id
AND paa.primary_flag = 'Y';
SELECT paa.assignment_number, paa.assignment_id, pos.date_start,
pos.final_process_date
FROM per_all_assignments_f paa,
per_all_people_f pap,
per_periods_of_service pos
WHERE pap.employee_number = v_empl_nr
AND pap.person_id = paa.person_id
AND paa.period_of_service_id = pos.period_of_service_id
AND v_effective_date BETWEEN paa.effective_start_date
AND paa.effective_end_date
AND v_effective_date BETWEEN pap.effective_start_date
AND pap.effective_end_date
AND paa.business_group_id = v_bg_id
AND paa.primary_flag = 'Y';
SELECT /*+ ORDERED use_nl(pap paa pos) */
paa.assignment_number, paa.assignment_id, pos.date_start,
pos.final_process_date
FROM per_all_people_f pap,
per_all_assignments_f paa,
per_periods_of_service pos
WHERE pap.national_identifier = v_ni_nr
AND pap.business_group_id = v_bg_id
AND pap.person_id = paa.person_id
AND paa.period_of_service_id = pos.period_of_service_id
AND v_effective_date BETWEEN paa.effective_start_date
AND paa.effective_end_date
AND v_effective_date BETWEEN pap.effective_start_date
AND pap.effective_end_date
AND paa.business_group_id = v_bg_id
AND paa.primary_flag = 'Y';
select pet.element_name, pet.element_type_id
from pay_element_types_f pet
where ( pet.element_type_id = v_el_type_id
or pet.element_name = v_el_name
)
and pet.legislation_code = v_leg_cd
and pet.business_group_id is null;