The following lines contain the word 'select', 'insert', 'update' or 'delete':
select nvl(min(ASG.effective_start_date), END_OF_TIME)
from per_all_assignments_f ASG
where ASG.assignment_id = p_assignment_id
and ASG.effective_start_date <= p_upload_date;
select nvl(PTP.start_date, END_OF_TIME)
from per_time_periods PTP
,per_assignments_f ASS
where ASS.assignment_id = p_assignment_id
and p_upload_date between ASS.effective_start_date
and ASS.effective_end_date
and PTP.payroll_id = ASS.payroll_id
and p_upload_date between PTP.start_date
and PTP.end_date;
select nvl(greatest(min(ASS.effective_start_date), p_expiry_date),
END_OF_TIME)
from per_all_assignments_f ASS
where ASS.assignment_id = p_assignment_id
and ASS.effective_start_date <= p_upload_date
and ASS.effective_end_date >= p_expiry_date;
select ADD_MONTHS(TRUNC(p_upload_date, 'Y'),
TO_CHAR(p_upload_date, 'MM') -
DECODE(MOD(TO_NUMBER(TO_CHAR(p_upload_date,'MM')),2),
1, 1,
0, 2)
)
from dual ;
SELECT BT.balance_type_id
FROM pay_balance_types BT
WHERE BT.balance_type_id = p_balance_type_id
--
-- JURISDICTION_CODE context NB. if the jurisdiction code is
-- used then only those adjustments which are for the same
-- jurisdiction code can be included.
--
and ((p_source_id is null) or
(p_source_id is not null and p_source_id = p_bal_adj_source_id))
--
--
-- ORIGINAL_ENTRY_ID context NB. this context controls the expiry
-- date of the dimension in the same way as the QTD dimension. Any
-- existing balance adjustments that lie between the upload date
-- and the expiry date are all included. There is no special
-- criteria that has to be met.
--
AND 1 = 1;
select pbbl.source_id
from pay_balance_batch_lines pbbl
,hr_organization_units hou
where pbbl.batch_line_id = p_batch_line_id
and pbbl.source_id=hou.organization_id;
SELECT source_id
,original_entry_id
FROM pay_temp_balance_adjustments
WHERE batch_line_id = p_test_batch_line_id;