The following lines contain the word 'select', 'insert', 'update' or 'delete':
Purpose : This returns the select statement that is used to created the
range rows.
Arguments :
Notes :
*/
procedure range_cursor (pactid in number, sqlstr out nocopy varchar2) is
begin
--
sqlstr := 'select distinct asg.person_id
from
per_all_assignments_f asg,
pay_payroll_actions pa1
where pa1.payroll_action_id = :payroll_action_id
and asg.business_group_id = pa1.business_group_id
order by asg.person_id';
select distinct paf.assignment_id
from per_periods_of_service pos,
per_all_assignments_f paf,
pay_payroll_actions ppa
where ppa.payroll_action_id = cp_pactid
and ppa.business_group_id = paf.business_group_id
and pos.period_of_service_id = paf.period_of_service_id
and pos.person_id between cp_stperson and cp_endperson;
select pay_assignment_actions_s.nextval
into l_action_id
from dual;
select paf.assignment_id
, paf.business_group_id
from pay_temp_object_actions toa
, per_all_assignments_f paf
where toa.object_action_id = p_ass_act_id
and toa.object_type = 'ASG'
and toa.object_id = paf.assignment_id
and p_eff_date between paf.effective_start_date
and paf.effective_end_date;
select
pay_core_utils.get_parameter('FORM_ID', ppa.legislative_parameters)
into l_formula_id
from pay_payroll_actions ppa
, pay_temp_object_actions toa
where ppa.payroll_action_id = toa.payroll_action_id
and toa.object_action_id = p_assactid;
select
pay_core_utils.get_parameter('REMOVE_ACT',
ppa.legislative_parameters),
ppa.business_group_id,
pbg.legislation_code
into
l_remove_act,
l_bus_grp_id,
l_leg_code
from pay_payroll_actions ppa,
per_business_groups pbg
where ppa.payroll_action_id = pactid
and pbg.business_group_id = ppa.business_group_id;
select count(*)
into cnt_incomplete_actions
from pay_temp_object_actions
where payroll_action_id = pactid
and action_status <> 'C';