The following lines contain the word 'select', 'insert', 'update' or 'delete':
select audit_result
into l_last_audit_status
from amw_opinions_v
where pk1_value = p_process_id and pk3_value = p_org_id
and object_opinion_type_id =
(select object_opinion_type_id from AMW_OBJECT_OPINION_TYPES
where opinion_type_id = (select opinion_type_id from amw_opinion_types_b where opinion_type_code = p_mode)
and object_id = (select object_id from fnd_objects where obj_name = 'AMW_ORG_PROCESS') )
and last_update_date =
(select max(last_update_date) from amw_opinions_v
where pk1_value = p_process_id and pk3_value = p_org_id
and object_opinion_type_id =
(select object_opinion_type_id from AMW_OBJECT_OPINION_TYPES
where opinion_type_id = (select opinion_type_id from amw_opinion_types_b where opinion_type_code = p_mode)
and object_id = (select object_id from fnd_objects where obj_name = 'AMW_ORG_PROCESS') ) );
l_last_update_date date;
select max(last_update_date) into l_last_update_date from amw_opinions_v
where pk1_value = p_process_id and pk3_value = p_org_id
and object_opinion_type_id =
(select object_opinion_type_id from AMW_OBJECT_OPINION_TYPES
where opinion_type_id = (select opinion_type_id from amw_opinion_types_b where opinion_type_code = p_mode)
and object_id = (select object_id from fnd_objects where obj_name = 'AMW_ORG_PROCESS') );
return l_last_update_date;