The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'error'
FROM dual
WHERE EXISTS (
SELECT 'x'
FROM hxc_entity_groups heg
WHERE heg.name = p_name
and heg.entity_type = 'PUBLIC_TEMPLATE_GROUP'
and heg.business_group_id = p_business_group_id);
PROCEDURE insert_public_temp_grp_comp(
p_entity_group_id IN NUMBER
,p_entity_id IN NUMBER
,p_attribute1 IN VARCHAR2
,p_attribute_category IN VARCHAR2
)
IS
l_object_version_number HXC_ENTITY_GROUP_COMPS.OBJECT_VERSION_NUMBER%TYPE;
SELECT 'error'
FROM dual
WHERE EXISTS (
SELECT 'x'
FROM hxc_entity_group_comps egc
WHERE egc.entity_group_id = p_entity_group_id
AND egc.entity_type = 'PUBLIC_TEMPLATE_GROUP'
AND egc.entity_id = p_entity_id );
SELECT 'error'
FROM dual
WHERE EXISTS (
SELECT 'x'
FROM hxc_entity_group_comps egc
WHERE egc.entity_group_id = p_entity_group_id
AND egc.entity_type = 'PUBLIC_TEMPLATE_GROUP'
AND egc.attribute1 = p_attribute1 );
END insert_public_temp_grp_comp;
SELECT
object_version_number
FROM hxc_entity_groups heg
WHERE entity_group_id = p_entity_group_id
AND heg.business_group_id = p_business_group_id;
SELECT
object_version_number,
entity_group_comp_id
FROM
hxc_entity_group_comps egc
WHERE
entity_group_id = p_entity_group_id
AND entity_id = TO_NUMBER(p_entity_id) ;
SELECT
object_version_number,
entity_group_comp_id
FROM
hxc_entity_group_comps egc
WHERE
entity_group_id = p_entity_group_id
AND attribute1 = p_entity_id ;
PROCEDURE update_public_temp_grp_comp(
p_entity_group_id IN NUMBER
,p_entity_id IN HXC_TEMPLATE_ID_TABLE
)
IS
l_count NUMBER;
END update_public_temp_grp_comp;
PROCEDURE update_entity_group_rec(
p_entity_group_id IN OUT NOCOPY NUMBER
,p_name IN VARCHAR2
,p_description IN VARCHAR2
)
IS
l_object_version_number HXC_ENTITY_GROUPS.OBJECT_VERSION_NUMBER%TYPE;
SELECT
object_version_number
,business_group_id
,legislation_code
,name
FROM
hxc_entity_groups heg
WHERE
entity_group_id = p_entity_group_id;
SELECT 'error'
FROM dual
WHERE EXISTS (
SELECT 'x'
FROM hxc_entity_groups heg
WHERE heg.name = p_name
and heg.entity_type = 'PUBLIC_TEMPLATE_GROUP'
and heg.business_group_id = l_business_group_id);
END update_entity_group_rec;
insert_public_temp_grp_comp(p_entity_group_id, -1, l_template_id, l_template_id);
insert_public_temp_grp_comp(p_entity_group_id, l_entity_id, null, 'PUBLIC_TEMPLATE');
SELECT
name PREF_HIERARCHY
FROM
HXC_PREF_HIERARCHIES
WHERE
attribute_category = 'TC_W_PUBLIC_TEMPLATE'
AND business_group_id = p_business_group_id
AND
(attribute1 = p_public_template_group_id OR
attribute2 = p_public_template_group_id OR
attribute3 = p_public_template_group_id OR
attribute4 = p_public_template_group_id OR
attribute5 = p_public_template_group_id OR
attribute6 = p_public_template_group_id OR
attribute7 = p_public_template_group_id OR
attribute8 = p_public_template_group_id OR
attribute9 = p_public_template_group_id OR
attribute10 =p_public_template_group_id)
AND ROWNUM < g_max_group_retrieve ;
FUNCTION can_delete_public_template (p_template_id in hxc_time_building_blocks.time_building_block_id%type
) RETURN VARCHAR2 IS
CURSOR cur_attached_public_temp_grps(p_template_id in hxc_time_building_blocks.time_building_block_id%type)
IS
SELECT heg.NAME FROM hxc_entity_groups heg ,
hxc_entity_group_comps hegc
WHERE
heg.ENTITY_TYPE = 'PUBLIC_TEMPLATE_GROUP'
and heg.entity_group_id =hegc.entity_group_id
and hegc.entity_id = p_template_id and rownum
END can_delete_public_template;