The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
attribute_id
,name
,attribute_type
,line_item
,start_date
,end_date
,description
,security_group_id
,approver_type_id
,item_class_id
,object_version_number
,created_by
from ame_attributes
where attribute_id = p_attribute_id
and p_effective_date
between start_date
and nvl(end_date - ame_util.oneSecond,p_effective_date);
update ame_attributes t
set t.end_date = p_new_end_date
, t.object_version_number = l_object_version_number
where t.attribute_id = p_attribute_id
and p_effective_date
between t.start_date and nvl(t.end_date - ame_util.oneSecond,p_effective_date)
;
select
attribute_id
,name
,attribute_type
,line_item
,start_date
,end_date
,description
,security_group_id
,approver_type_id
,item_class_id
,object_version_number
,created_by
from ame_attributes
where attribute_id = p_attribute_id
and p_effective_date
between start_date and nvl(end_date - ame_util.oneSecond, p_effective_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 ame_attributes t
where t.attribute_id = p_attribute_id;