The following lines contain the word 'select', 'insert', 'update' or 'delete':
select greatest (min(a.effective_start_date), min(PTP.start_date))
, min(a.business_group_id)
from per_assignments_f a
,per_time_periods PTP
where a.assignment_id = p_assignment_id
and PTP.payroll_id = a.payroll_id
and PTP.start_date <= p_effective_date
and ptp.start_date between a.effective_start_date and p_effective_date
and p_effective_date between a.effective_start_date and a.effective_end_date
order by a.effective_start_date ;
select nvl(ptp.start_date, g_end_of_time)
from per_time_periods ptp
, per_assignments_f paf
where paf.assignment_id = p_assignment_id
and p_upload_date between paf.effective_start_date
and paf.effective_end_date
and ptp.payroll_id = paf.payroll_id
and p_upload_date between ptp.start_date
and ptp.end_date ;
SELECT BT.balance_type_id
FROM pay_balance_types BT
WHERE BT.balance_type_id = p_balance_type_id
and ((p_tax_unit_id is null) or
(p_tax_unit_id is not null and p_tax_unit_id = p_bal_adj_tax_unit_id)) ;
SELECT htuv.tax_unit_id
FROM pay_balance_batch_lines pbbl
,hr_tax_units_v htuv
WHERE pbbl.batch_line_id = p_batch_line_id
AND pbbl.tax_unit_id = htuv.tax_unit_id
AND pbbl.tax_unit_id IS NOT NULL
UNION ALL
SELECT htuv.tax_unit_id
FROM pay_balance_batch_lines pbbl
,hr_tax_units_v htuv
WHERE pbbl.batch_line_id = p_batch_line_id
AND upper(pbbl.gre_name) = UPPER(htuv.name)
AND pbbl.tax_unit_id IS NULL;
SELECT tax_unit_id
FROM pay_temp_balance_adjustments
WHERE batch_line_id = p_test_batch_line_id;