The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_datetrack_update_mode varchar2(30);
select 1
from per_assignments_f asg
where asg.person_id = p_person_id
and asg.effective_start_date >= p_hire_date; -- bug 4681265 changed the condition from ' > ' to " >= " .
select 1
from per_all_assignments_f asg
where asg.person_id = p_person_id
and asg.effective_start_date >= p_hire_date
and asg.assignment_type = 'E';
select ppt.system_person_type,
per.effective_start_date,
per.object_version_number
from per_all_people_f per,
per_person_types ppt
where per.person_type_id = ppt.person_type_id
and per.person_id = p_person_id
and p_date between per.effective_start_date
and per.effective_end_date;
select asg.assignment_id
,asg.object_version_number
from per_all_assignments_f asg
where asg.person_id=p_person_id
and p_date=asg.effective_start_date;
select pas.per_system_status
, asg.object_version_number
, asg.effective_start_date
from per_assignments_f asg,
per_assignment_status_types pas
where asg.assignment_id=p_assignment_id
and asg.assignment_status_type_id = pas.assignment_status_type_id
and p_date between asg.effective_start_date
and asg.effective_end_date;
select *
from per_contact_relationships
where person_id=p_person_id
and date_start=l_hire_date;
select *
from per_contact_relationships
where contact_person_id=p_person_id
and date_start=l_hire_date;
select distinct PAAF.business_group_id
from per_all_assignments_f PAAF
where PAAF.assignment_id=p_asg_id;
if (nvl(fnd_profile.value('HR_ALLOW_FPT_UPDATES'),'N') = 'Y') then
open fpt_future_asg_changes;
update per_all_people_f
set
effective_start_date=l_hire_date-1
,start_date=l_hire_date-1
,original_date_of_hire=decode(original_date_of_hire
,l_hire_date,l_hire_date-1
,original_date_of_hire)
where person_id=p_person_id
and effective_start_date=l_hire_date;
update per_applications
set date_received=l_hire_date-1
where person_id=p_person_id
and date_received=l_hire_date;
update per_letter_request_lines
set date_from=l_hire_date-1
where assignment_id=(select asg2.assignment_id
from per_all_assignments_f asg2
where asg2.person_id=p_person_id
and asg2.assignment_type='A'
and asg2.effective_start_date=l_hire_date)
and date_from=l_hire_date;
update per_contact_relationships
set date_start=l_hire_date-1
where person_id=p_person_id
and date_start=l_hire_date
and contact_relationship_id = l_c1.contact_relationship_id;
update per_contact_relationships
set date_start=l_hire_date-1
where contact_person_id=p_person_id
and date_start=l_hire_date
and contact_relationship_id = l_c2.contact_relationship_id;
update per_all_assignments_f
set effective_start_date=l_hire_date-1
where person_id=p_person_id
and assignment_type='A'
and effective_start_date=l_hire_date;
update per_letter_request_lines
set date_from=l_hire_date-1
where assignment_id=(select asg2.assignment_id
from per_all_assignments_f asg2
where asg2.person_id=p_person_id
and asg2.assignment_type='A'
and asg2.effective_start_date=l_hire_date)
and date_from=l_hire_date;
update per_all_assignments_f
set effective_start_date=l_hire_date-1
where person_id=p_person_id
and assignment_type='A'
and effective_start_date=l_hire_date;
update per_letter_request_lines
set date_from=l_hire_date-1
where assignment_id=(select asg2.assignment_id
from per_all_assignments_f asg2
where asg2.person_id=p_person_id
and asg2.assignment_type='A'
and asg2.effective_start_date=l_hire_date)
and date_from=l_hire_date;
update per_all_assignments_f
set effective_start_date=l_hire_date-1
where person_id=p_person_id
and assignment_type='A'
and effective_start_date=l_hire_date;
update per_all_assignments_f
set effective_end_date=l_hire_date-2
where person_id=p_person_id
and assignment_type='A'
and effective_end_date=l_hire_date-1;
l_datetrack_update_mode:='CORRECTION';
l_datetrack_update_mode:='UPDATE';
,p_datetrack_update_mode => l_datetrack_update_mode
,p_assignment_id => p_assignment_id
,p_object_version_number => l_asg_object_version_number
,p_assignment_status_type_id => null
,p_change_reason => null
,p_effective_start_date => l_asg_effective_start_date
,p_effective_end_date => l_asg_effective_end_date
);
p_dt_mode => 'UPDATE',
p_validation_start_date => p_per_effective_start_date,
p_validation_end_date => p_per_effective_end_date
);*/
update per_all_people_f
set effective_start_date=l_hire_date-1
where person_id=p_person_id
and effective_start_date=l_hire_date;
update per_all_people_f
set effective_end_date=l_hire_date-2
where person_id=p_person_id
and effective_end_date=l_hire_date-1;
update per_all_assignments_f
set effective_start_date=l_hire_date-1
where person_id=p_person_id
and assignment_type='A'
and effective_start_date=l_hire_date;
update per_applications
set date_received=l_hire_date-1
where person_id=p_person_id
and date_received=l_hire_date;
update per_all_assignments_f
set effective_start_date=l_hire_date-1
where person_id=p_person_id
and assignment_type='A'
and effective_start_date=l_hire_date;
update per_all_assignments_f
set effective_end_date=l_hire_date-2
where person_id=p_person_id
and assignment_type='A'
and effective_end_date=l_hire_date-1;
update per_all_assignments_f
set effective_start_date=l_hire_date-1
where person_id=p_person_id
and assignment_type='A'
and effective_start_date=l_hire_date;
update per_applications
set date_received=l_hire_date-1
where person_id=p_person_id
and date_received=l_hire_date;
l_datetrack_update_mode:='CORRECTION';
l_datetrack_update_mode:='UPDATE';
,p_datetrack_update_mode => l_datetrack_update_mode
,p_assignment_id => p_assignment_id
,p_object_version_number => l_asg_object_version_number
,p_assignment_status_type_id => null
,p_change_reason => null
,p_effective_start_date => l_asg_effective_start_date
,p_effective_end_date => l_asg_effective_end_date
);
select formula_id
from ff_formulas_f fff
, ff_formula_types fft
where fff.formula_name = p_name
and p_effective_date between fff.effective_start_date and fff.effective_end_date
and fff.formula_type_id=fft.formula_type_id
and fft.formula_type_name='People Management Message';