The following lines contain the word 'select', 'insert', 'update' or 'delete':
select '1'
from hxc_resource_rules hrr
where hrr.eligibility_criteria_id = to_char(p_login_id)
and hrr.eligibility_criteria_type = 'LOGIN'
and hrr.resource_type = 'PERSON'
and hrr.pref_hierarchy_id = l_pref_hierarchy_id;
select pref_hierarchy_id, max(object_version_number)
from hxc_pref_hierarchies
where name = to_char(p_login_id)
and parent_pref_hierarchy_id is null
and type ='USER'
group by pref_hierarchy_id;
select pref_hierarchy_id, max(object_version_number)
from hxc_pref_hierarchies hph
where hph.name = p_preference_code
and hph.parent_pref_hierarchy_id = l_top_hierarchy_id
group by pref_hierarchy_id;
-- Update the preference hierarchy
l_object_version_number := l_pref_ovn;
hxc_pref_hierarchies_api.update_pref_hierarchies
(p_effective_date => sysdate
,p_type => 'USER'
,p_name => p_preference_code
,p_business_group_id => p_business_group_id
,p_legislation_code => p_legislation_code
,p_parent_pref_hierarchy_id => l_top_hcy_id
,p_edit_allowed => 'Y'
,p_displayed => 'Y'
,p_pref_definition_id => p_preference_id
,p_attribute_category => p_pref_attribute_category
,p_attribute1 => p_pref_attribute1
,p_attribute2 => p_pref_attribute2
,p_attribute3 => p_pref_attribute3
,p_attribute4 => p_pref_attribute4
,p_attribute5 => p_pref_attribute5
,p_attribute6 => p_pref_attribute6
,p_attribute7 => p_pref_attribute7
,p_attribute8 => p_pref_attribute8
,p_attribute9 => p_pref_attribute9
,p_attribute10 => p_pref_attribute10
,p_attribute11 => p_pref_attribute11
,p_attribute12 => p_pref_attribute12
,p_attribute13 => p_pref_attribute13
,p_attribute14 => p_pref_attribute14
,p_attribute15 => p_pref_attribute15
,p_attribute16 => p_pref_attribute16
,p_attribute17 => p_pref_attribute17
,p_attribute18 => p_pref_attribute18
,p_attribute19 => p_pref_attribute19
,p_attribute20 => p_pref_attribute20
,p_attribute21 => p_pref_attribute21
,p_attribute22 => p_pref_attribute22
,p_attribute23 => p_pref_attribute23
,p_attribute24 => p_pref_attribute24
,p_attribute25 => p_pref_attribute25
,p_attribute26 => p_pref_attribute26
,p_attribute27 => p_pref_attribute27
,p_attribute28 => p_pref_attribute28
,p_attribute29 => p_pref_attribute29
,p_attribute30 => p_pref_attribute30
,p_orig_pref_hierarchy_id => null
,p_orig_parent_hierarchy_id => null
,p_pref_hierarchy_id => l_pref_hcy_id
,p_object_version_number => l_object_version_number);
hxc_pref_hierarchies_api.update_pref_hierarchies
(p_effective_date => sysdate
,p_type => 'USER'
,p_name => to_char(p_login_id)
,p_business_group_id => p_business_group_id
,p_legislation_code => p_legislation_code
,p_parent_pref_hierarchy_id => null
,p_edit_allowed => 'Y'
,p_displayed => 'Y'
,p_pref_definition_id => null
,p_attribute_category => null
,p_attribute1 => null
,p_attribute2 => null
,p_attribute3 => null
,p_attribute4 => null
,p_attribute5 => null
,p_attribute6 => null
,p_attribute7 => null
,p_attribute8 => null
,p_attribute9 => null
,p_attribute10 => null
,p_attribute11 => null
,p_attribute12 => null
,p_attribute13 => null
,p_attribute14 => null
,p_attribute15 => null
,p_attribute16 => null
,p_attribute17 => null
,p_attribute18 => null
,p_attribute19 => null
,p_attribute20 => null
,p_attribute21 => null
,p_attribute22 => null
,p_attribute23 => null
,p_attribute24 => null
,p_attribute25 => null
,p_attribute26 => null
,p_attribute27 => null
,p_attribute28 => null
,p_attribute29 => null
,p_attribute30 => null
,p_orig_pref_hierarchy_id => null
,p_orig_parent_hierarchy_id => null
,p_pref_hierarchy_id => l_top_hcy_id
,p_object_version_number => l_top_ovn);