DBA Data[Home] [Help]

APPS.PAY_CONSUMED_ENTRY SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 29

SELECT  start_date,
	end_date
INTO	l_period_start,
	l_period_end
FROM	per_time_periods
WHERE	payroll_id 					= p_payroll_id
AND	p_date_earned BETWEEN start_date AND end_date;
Line: 41

SELECT	/*+ INDEX(PPA PAY_PAYROLL_ACTIONS_PK)*/
        DECODE(COUNT(PRR.run_result_id), 0, 'N', 'Y')
INTO	v_consumed
FROM	pay_run_results		PRR,
	pay_assignment_actions	ASA,
	pay_payroll_actions	PPA
WHERE	PRR.source_id			= p_ele_entry_id
AND	PRR.source_type		IN ('E', 'I')
AND     PRR.status		in ('P', 'PA', 'R', 'O')
AND	ASA.assignment_action_id	= PRR.assignment_action_id
AND	PPA.payroll_action_id		= ASA.payroll_action_id
--
-- Check whether the run_result has been revered.
AND     not exists (select null
                    from pay_run_results prr2
                    where prr2.source_id = PRR.run_result_id
                      and prr2.source_type in ('R', 'V'))
AND	PPA.date_earned		BETWEEN l_period_start
				AND	l_period_end;