DBA Data[Home] [Help]

APPS.DK_CONSUMED_ENTRY SQL Statements

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

Line: 23

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: 35

SELECT	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
ASA.assignment_id			= p_asg_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;
Line: 88

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: 101

SELECT	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;
Line: 120

select 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,
 pay_run_result_values PRVV
,pay_input_values_f PIVF
,pay_element_types_f PET
WHERE	PRR.source_id			= p_ele_entry_id
AND	PRR.source_type		IN ('E', 'I')
AND     PRR.status		in ('P', 'PA', 'R', 'O')
AND PRR.run_result_id=PRVV.run_result_id
AND	ASA.assignment_action_id	= PRR.assignment_action_id
AND	PPA.payroll_action_id		= ASA.payroll_action_id
AND pivf.name in ('Termination Accrual Days','Termination Next Entit Days',
                  'Termination Curr Entit Days','Termination Accrual Amount',
		  'Termination Next Entit Pay','Termination Curr Entit Pay')
AND pivf.input_Value_id=prvv.input_value_id
AND pivf.element_type_id=PRR.element_type_id
AND PET.element_name='Holiday Bank Information'
AND PET.element_type_id=PIVF.element_type_id
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;