The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT pv.policy_char_value
INTO x_policy_value
from eng_change_rule_attributes_vl ra,
eng_change_rules r,
eng_change_policy_values pv,
eng_change_policies p
where
p.policy_object_name = p_policy_object_name
and p.policy_code= p_policy_code
and p.policy_object_pk1_value = p_policy_pk1_value
and p.policy_object_pk2_value = p_policy_pk2_value
and p.policy_object_pk3_value = p_policy_pk3_value
and ra.attribute_object_name = p_attribute_object_name
and ra.attribute_code = p_attribute_code
and nvl(r.attribute_number_value,'') = nvl(p_attribute_value,'')
and p.change_policy_id = pv.change_policy_id
and pv.change_rule_id = r.change_rule_id
and r.attribute_object_name = ra.attribute_object_name
and r.attribute_code = ra.attribute_code;
select decode (max(restrict_id), 30, 'NOT_ALLOWED',
20, 'CHANGE_ORDER_REQUIRED',
10, 'ALLOWED')
from
( select decode( pv.policy_char_value, 'NOT_ALLOWED', 30,
'CHANGE_ORDER_REQUIRED', 20,
10) restrict_id
from eng_change_rule_attributes_vl ra,
eng_change_rules r,
eng_change_policy_values pv,
eng_change_policies p
where
p.policy_object_name = 'CATALOG_LIFECYCLE_PHASE'
and p.policy_code= 'CHANGE_POLICY'
and p.policy_object_pk1_value = !' || p_catalog_category_id || q'!
and p.policy_object_pk2_value = !' || p_item_lifecycle_id || q'!
and p.policy_object_pk3_value = !' || p_lifecycle_phase_id || q'!
and ra.attribute_object_name = 'EGO_CATALOG_GROUP'
and ra.attribute_code = 'ATTRIBUTE_GROUP'
and r.attribute_number_value in !'
|| '('|| p_attribute_grp_ids|| ')' || q'!
and p.change_policy_id = pv.change_policy_id
and pv.change_rule_id = r.change_rule_id
and r.attribute_object_name = ra.attribute_object_name
and r.attribute_code = ra.attribute_code)!';