The following lines contain the word 'select', 'insert', 'update' or 'delete':
(select ff.descriptive_flex_context_code
from fnd_descr_flex_contexts_vl ff
where ff.DESCRIPTIVE_FLEX_CONTEXT_NAME = p_reference_object
and p_alias_type = 'OTL_ALT_DDF'
union
select to_char(ff.FLEX_VALUE_SET_ID)
from fnd_flex_value_sets ff
where ff.FLEX_VALUE_SET_NAME = p_reference_object
and p_alias_type in ('VALUE_SET_NONE','VALUE_SET_TABLE')
);
SELECT alias_type_id
FROM hxc_alias_types
WHERE alias_type = p_alias_type
and reference_object = p_reference_object;
SELECT mapping_component_id
FROM hxc_mapping_components
WHERE name = p_mapping_component_name;
SELECT alias_type_id
, alias_type
, reference_object
, object_version_number
, DECODE( NVL(last_updated_by,-1), 1, 'SEED', 'CUSTOM')
INTO l_alias_type_id
, l_alias_type
, l_reference_object
, l_ovn
, l_owner
FROM hxc_alias_types
WHERE alias_type = P_alias_type
and reference_object= l_alias_reference_object;
-- only update if the alias type has actually changed
IF ( ( p_alias_type <> l_alias_type ) OR ( l_alias_reference_object <> l_reference_object)
) then
hxc_hat_upd.upd (
p_alias_type => p_alias_type,
p_reference_object => l_alias_reference_object,
p_alias_type_id => l_alias_type_id,
p_object_version_number => l_ovn
);
SELECT alias_type_component_id
, object_version_number
, DECODE( NVL(last_updated_by,-1), 1, 'SEED', 'CUSTOM')
, component_name
, component_type
INTO l_alias_type_component_id
, l_ovn
, l_owner
, l_component_name
, l_component_type
FROM hxc_alias_type_components hatc
WHERE hatc.mapping_component_id = l_mapping_component_id
AND hatc.ALIAS_TYPE_ID = l_alias_type_id;
-- only update if the alias component mapping that has actually changed
-- IF ( ( p_component_name <> l_component_name ) OR ( p_component_type <> l_component_type)
-- )
-- THEN
hxc_atc_upd.upd (
p_component_name => p_component_name
,p_component_type => p_component_type
,p_mapping_component_id => l_mapping_component_id
,p_alias_type_id => l_alias_type_id
,p_alias_type_component_id => l_alias_type_component_id
,p_object_version_number => l_ovn
);