The following lines contain the word 'select', 'insert', 'update' or 'delete':
select ptp.start_date
into l_period_start_date
from per_time_periods ptp, pay_payroll_actions ppa
where ppa.payroll_action_id = p_user_payroll_action_id
and ppa.payroll_id = ptp.payroll_id
and p_user_effective_date between ptp.start_date and ptp.end_date;
/* select the start of the financial year - if the owning action is
* before this or for a different payroll then its expired
*/
Select to_date('01-01-' || to_char( fnd_number.canonical_to_number(
to_char( BACT.effective_date,'YYYY'))
+ decode(sign( BACT.effective_date - to_date('01-01-'
|| to_char(BACT.effective_date,'YYYY'),'DD-MM-YYYY')),
-1,-1,0)),'DD-MM-YYYY') finyear, BACT.payroll_id
into l_tax_year_start, l_user_payroll_id
from pay_payroll_actions BACT
where BACT.payroll_action_id = p_user_payroll_action_id;
* Select the period of the owning and using action and if they are
* the same then the dimension has expired - either a prior period
* or a different payroll
*/
select time_period_id
into l_user_time_period_id
from pay_payroll_actions
where payroll_action_id = p_user_payroll_action_id;
select time_period_id
into l_owner_time_period_id
from pay_payroll_actions
where payroll_action_id = p_owner_payroll_action_id;