The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
referral_info_id
,object_id
,object_type
,start_date
,end_date
,source_type
,source_name
,source_criteria1
,source_value1
,source_criteria2
,source_value2
,source_criteria3
,source_value3
,source_criteria4
,source_value4
,source_criteria5
,source_value5
,source_person_id
,candidate_comment
,employee_comment
,irf_attribute_category
,irf_attribute1
,irf_attribute2
,irf_attribute3
,irf_attribute4
,irf_attribute5
,irf_attribute6
,irf_attribute7
,irf_attribute8
,irf_attribute9
,irf_attribute10
,irf_information_category
,irf_information1
,irf_information2
,irf_information3
,irf_information4
,irf_information5
,irf_information6
,irf_information7
,irf_information8
,irf_information9
,irf_information10
,object_created_by
,created_by
,object_version_number
from irc_referral_info
where referral_info_id = p_referral_info_id;
update irc_referral_info t
set t.end_date = p_new_end_date
, t.object_version_number = l_object_version_number
where t.referral_info_id = p_referral_info_id
and p_effective_date
between t.start_date and t.end_date;
select
referral_info_id
,object_id
,object_type
,start_date
,end_date
,source_type
,source_name
,source_criteria1
,source_value1
,source_criteria2
,source_value2
,source_criteria3
,source_value3
,source_criteria4
,source_value4
,source_criteria5
,source_value5
,source_person_id
,candidate_comment
,employee_comment
,irf_attribute_category
,irf_attribute1
,irf_attribute2
,irf_attribute3
,irf_attribute4
,irf_attribute5
,irf_attribute6
,irf_attribute7
,irf_attribute8
,irf_attribute9
,irf_attribute10
,irf_information_category
,irf_information1
,irf_information2
,irf_information3
,irf_information4
,irf_information5
,irf_information6
,irf_information7
,irf_information8
,irf_information9
,irf_information10
,object_created_by
,created_by
,object_version_number
from irc_referral_info
where referral_info_id = p_referral_info_id
and sysdate between start_date and end_date
for update nowait;
If (p_datetrack_mode <> hr_api.g_insert) then
--
-- We must select and lock the current row.
--
Open C_Sel1;
if (p_datetrack_mode = hr_api.g_update) then
p_validation_start_date := p_effective_date;
elsif (p_datetrack_mode = hr_api.g_delete) then
p_validation_start_date := p_effective_date;
select nvl(max(t.object_version_number),0) + 1
into l_ovn
from irc_referral_info t
where t.referral_info_id = p_referral_info_id;