The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT (PAY_SE_ARCHIVE_CWCA.get_parameter
(legislative_parameters
,'PERSON_ID'
)
) person_id
, (PAY_SE_ARCHIVE_CWCA.get_parameter
(legislative_parameters
,'ASSIGNMENT_ID'
)
) assignment_id
, (PAY_SE_ARCHIVE_CWCA.get_parameter
(legislative_parameters
,'STILL_EMPLOYED'
)
) still_employed
, (PAY_SE_ARCHIVE_CWCA.get_parameter
(legislative_parameters
,'REPORT_YEAR'
)
) report_year
, (PAY_SE_ARCHIVE_CWCA.get_parameter
(legislative_parameters
,'REPORT_MONTH'
)
) report_month
,effective_date effective_date
,business_group_id bg_id
FROM pay_payroll_actions
WHERE payroll_action_id = p_payroll_action_id;
SELECT MAX (effective_end_date) effective_date
FROM per_all_assignments_f paa
WHERE assignment_id = p_asg_id
AND paa.effective_start_date <= p_end_date
AND paa.effective_end_date > = p_start_date
AND assignment_status_type_id
IN
(SELECT assignment_status_type_id
FROM per_assignment_status_types
WHERE per_system_status = 'ACTIVE_ASSIGN'
AND active_flag = 'Y'
AND ((legislation_code is null and business_group_id is null)
OR (business_group_id = p_business_group_id)
));
SELECT REPLACE(UPPER(pbt.balance_name),' ' ,'_') balance_name , pbt.balance_name bname
FROM pay_balance_types pbt , pay_balance_categories_f pbc
WHERE pbc.legislation_code='SE'
AND pbt.business_group_id =p_business_group_id
AND pbt.balance_category_id = pbc.balance_category_id
AND pbc.category_name = p_balance_category_name ;
SELECT ue.creator_id
FROM ff_user_entities ue,
ff_database_items di
WHERE di.user_name = csr_v_Balance_Name
AND ue.user_entity_id = di.user_entity_id
AND ue.legislation_code is NULL
AND ue.business_group_id = p_business_group_id
AND ue.creator_type = 'B';
SELECT hl.location_code
,hl.description
,hl.address_line_1
,hl.address_line_2
,hl.address_line_3
,hl.postal_code
,hl.town_or_city
,hl.region_1
,hl.region_2
,ft.territory_short_name
FROM hr_organization_units hou
,hr_locations hl
,fnd_territories_vl ft
WHERE hl.location_id = csr_v_location_id
AND hl.country = ft.territory_code;
SELECT o.NAME
,hoi3.org_information2 "ORG_NUMBER"
,o.location_id
,o.organization_id
FROM hr_all_organization_units o
,hr_organization_information hoi1
,hr_organization_information hoi2
,hr_organization_information hoi3
WHERE o.business_group_id = g_business_group_id
AND hoi1.organization_id = o.organization_id
AND hoi1.org_information_context = 'CLASS'
AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi2.organization_id = hoi1.organization_id
AND hoi2.org_information_context = 'SE_LOCAL_UNITS'
AND hoi2.org_information1 = csr_v_local_unit_id
AND o.organization_id = hoi3.organization_id
AND hoi3.org_information_context = 'SE_LEGAL_EMPLOYER_DETAILS';
SELECT hoi4.org_information3
FROM hr_organization_information hoi4
WHERE hoi4.organization_id = csr_v_legal_employer_id
AND hoi4.org_information_context = 'SE_ORG_CONTACT_DETAILS'
AND hoi4.org_information_id =
(SELECT MIN (org_information_id)
FROM hr_organization_information
WHERE organization_id = csr_v_legal_employer_id
AND org_information_context = 'SE_ORG_CONTACT_DETAILS'
AND org_information1 = 'PHONE');
SELECT *
FROM per_all_people_f p
WHERE p.business_group_id = g_business_group_id
AND p.person_id = csr_v_person_id
AND csr_v_effective_date BETWEEN p.effective_start_date
AND p.effective_end_date;
SELECT *
FROM per_all_assignments_f p
WHERE p.business_group_id = g_business_group_id
AND p.assignment_id = csr_v_assignment_id
AND p.person_id = csr_v_person_id
AND csr_v_effective_date BETWEEN p.effective_start_date
AND p.effective_end_date;
SELECT *
FROM hr_soft_coding_keyflex
WHERE soft_coding_keyflex_id = csr_v_soft_coding_keyflex_id;
SELECT *
FROM per_assignment_extra_info
WHERE assignment_id = csr_v_assignment_id
AND information_type = csr_v_information_type;
SELECT *
FROM per_assignment_extra_info
WHERE assignment_id = csr_v_assignment_id
AND information_type = 'SE_WTC_TIME_WORKED_INFO'
AND aei_information1 = csr_v_year
AND aei_information2 = csr_v_month;
'SELECT DISTINCT person_id
FROM per_people_f ppf
,pay_payroll_actions ppa
WHERE ppa.payroll_action_id = :payroll_action_id
AND ppa.business_group_id = ppf.business_group_id
AND ppf.person_id = '''
|| g_person_id
|| '''
ORDER BY ppf.person_id';
SELECT LAST_DAY(l_asg_effective_end_date)
INTO l_report_end_date
FROM DUAL;
SELECT LAST_DAY(g_effective_date)
INTO l_report_end_date
FROM DUAL;
-- Insert the report Parameters
pay_action_information_api.create_action_information
(p_action_information_id => l_action_info_id
,p_action_context_id => p_payroll_action_id
,p_action_context_type => 'PA'
,p_object_version_number => l_ovn
,p_effective_date => g_effective_date
,p_source_id => NULL
,p_source_text => NULL
,p_action_information_category => 'EMEA REPORT DETAILS'
,p_action_information1 => 'PYSECWCA'
,p_action_information2 => g_person_id
,p_action_information3 => g_assignment_id
,p_action_information4 => g_still_employed
,p_action_information5 => g_business_group_id
,p_action_information6 => g_report_start_year
,p_action_information7 => g_report_start_month
,p_action_information8 => NULL
,p_action_information9 => NULL
,p_action_information10 => NULL
);
--SELECT last_day(l_report_start_date), LPAD(TO_CHAR(l_report_start_date,'MM'), 2,'0'),TO_CHAR(l_report_start_date,'YYYY')
--INTO l_reporting_date, l_month, l_year
--FROM DUAL;
SELECT last_day(l_report_end_date), LPAD(TO_CHAR(l_report_end_date,'MM'), 2,'0'),TO_CHAR(l_report_end_date,'YYYY')
INTO l_reporting_date, l_month, l_year
FROM DUAL;
'select 1 from dual where to_char(:payroll_action_id) = dummy';
SELECT pdb.defined_balance_id
FROM pay_defined_balances pdb
,pay_balance_types pbt
,pay_balance_dimensions pbd
WHERE pbt.legislation_code='SE'
AND pbt.balance_name = p_balance_name
AND pbd.legislation_code = 'SE'
AND pbd.database_item_suffix = p_balance_dim
AND pdb.balance_type_id = pbt.balance_type_id
AND pdb.balance_dimension_id = pbd.balance_dimension_id;