The following lines contain the word 'select', 'insert', 'update' or 'delete':
select purpose_attribute_id
from fnd_purpose_attributes
where purpose_code = l_purpose_code
and privacy_attribute_code = l_privacy_attribute_code;
select contact_preference_id,
preference_code
FROM HZ_CONTACT_PREFERENCES pref
WHERE pref.CONTACT_LEVEL_TABLE_ID = l_party_id
AND pref.CONTACT_LEVEL_TABLE = 'HZ_PARTIES'
AND pref.preference_topic_type_code = l_purpose_code -- this will be l_purpose_code
AND pref.preference_topic_type = 'FND_BUSINESS_PURPOSES_B' -- this will be FND_BUSINESS_PURPOSES
AND pref.contact_type = 'PRIV_PREF'
AND status = 'A';
select decode(purpose_default_code, 'N', 'I', purpose_default_code) purpose_default_code
from fnd_business_purposes_b
where purpose_code = l_purpose_code;
select attr.purpose_attribute_id,
attr.purpose_code,
purp.purpose_default_code
from fnd_purpose_attributes attr,
fnd_business_purposes_b purp
where attr.privacy_attribute_code = l_privacy_attribute_code
and attr.purpose_code = purp.purpose_code;
select pref.contact_preference_id,
pref.preference_code
FROM HZ_CONTACT_PREFERENCES pref
WHERE pref.CONTACT_LEVEL_TABLE_ID = l_party_id
AND pref.CONTACT_LEVEL_TABLE = 'HZ_PARTIES'
AND pref.preference_topic_type_code = l_purpose_code -- this will be l_purpose_code
AND pref.preference_topic_type = 'FND_BUSINESS_PURPOSES_B' -- this will be FND_BUSINESS_PURPOSES
AND pref.contact_type = 'PRIV_PREF'
AND status = 'A' ;
select contact_preference_id,
preference_code
FROM HZ_CONTACT_PREFERENCES pref
WHERE pref.CONTACT_LEVEL_TABLE_ID = l_party_id
AND pref.CONTACT_LEVEL_TABLE = 'HZ_PARTIES'
AND pref.preference_topic_type_code = l_purpose_code -- this will be l_purpose_code
AND pref.preference_topic_type = 'FND_BUSINESS_PURPOSES_B' -- this will be FND_BUSINESS_PURPOSES
AND pref.contact_type = 'PRIV_PREF'
AND status = 'A';
select purpose_default_code
from fnd_business_purposes_b
where purpose_code = l_purpose_code;