The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_select varchar2(1000);
l_select := 'select count(1)
from (select /*+ ORDERED use_nl(paa,paf,emp,pai_payroll)
use_index(pai_person,pay_action_information_n2)
use_index(pai,pay_action_information_n2) */
paf.person_id, max(paa.assignment_action_id) as asg_id ';
l_where := l_where || ' and emp.action_information2 in(select organization_id_child
from per_org_structure_elements
where business_group_id = ' || p_org_hierarchy ||
' union
select ' || p_org_hierarchy || ' from dual)';
hr_utility.trace(l_select);
l_sql := l_select || l_from || l_where || l_group;
select mod(p_total,p_chunk_size)
into l_ret
from dual;
select floor(p_total / p_chunk_size)
into l_val
from dual;