The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT
PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'LEGAL_EMPLOYER')
,PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'MONTH')
,PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'YEAR')
,FND_DATE.canonical_to_date(PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,
'DECLARATION_DUE_DATE'))
,PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'ADMINISTRATIVE_CODE')
,PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'INFORMATION')
,PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'ARCHIVE')
,effective_date
,business_group_id
FROM pay_payroll_actions
WHERE payroll_action_id = p_payroll_action_id;
SELECT
pdb.defined_balance_id
INTO
l_defined_balance_id
FROM
pay_defined_balances pdb
,pay_balance_types pbt
,pay_balance_dimensions pbd
WHERE
pbd.database_item_suffix = p_dbi_suffix
AND (pbd.legislation_code = 'SE' OR pbt.business_group_id = l_business_id)
AND pbt.balance_name = p_balance_name
AND (pbt.legislation_code = 'SE' OR pbt.business_group_id = l_business_id)
AND pdb.balance_type_id = pbt.balance_type_id
AND pdb.balance_dimension_id = pbd.balance_dimension_id
AND (pdb.legislation_code = 'SE' OR pbt.business_group_id = l_business_id);
SELECT
DISTINCT pbt.balance_name
INTO p_balance_name
FROM
pay_balance_types pbt
WHERE
pbt.input_value_id = p_input_value_id
AND ROWNUM < 2;
select count(*)
from pay_action_information
where action_information_category = 'EMEA REPORT DETAILS'
and action_information1 = 'PYSETADA'
and action_context_id = pactid;
select
ou.Name Organization_Name,
hoi2.org_information2 Organization_Number,
TO_CHAR(TO_DATE(hoi4.org_information1,'MM'),'MONTH') Month,
hoi4.org_information2 Year,
nvl(pay_balance_pkg.get_value(get_defined_balance_id
('Gross Pay','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Gross_Pay,
nvl(pay_balance_pkg.get_value(get_defined_balance_id
('Employer Taxable Benefits in Kind','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Benefit,
--hoi4.org_information3 Reduction,
nvl(pay_balance_pkg.get_value(get_defined_balance_id
('Cost Reduction','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Reduction,
nvl(pay_balance_pkg.get_value(get_defined_balance_id
('Regular Employer Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Regular_Taxable_Base,
nvl(pay_balance_pkg.get_value(get_defined_balance_id
('Regular Employer Tax','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Regular_Tax,
nvl(pay_balance_pkg.get_value(get_defined_balance_id
('Special Taxation Age 65 Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Special_65_Taxable_Base,
nvl(pay_balance_pkg.get_value(get_defined_balance_id
('Special Taxation Age 65 Tax','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Special_65_Tax,
nvl(pay_balance_pkg.get_value(get_defined_balance_id
('Special Taxation Year 1937 Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Special_1937_Taxable_Base,
nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
('Special Taxation Year 1937 Tax','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Special_1937_Tax,
nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
('Foreigners Below 65 Employer Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu,
nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
('Foreigners Below 65 Employer Tax','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu_29,
nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
('Foreigners Below 25 Employer Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu_25_Below,
nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
('Foreigners Below 25 Employer Tax','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu_29_25_below,
nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
('Foreigners Above 65 Employer Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu_65_above,
nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
('Foreigners Above 65 Employer Tax','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu_29_65_above,
nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
('Special Taxation Age 25 below Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Special_25_below_Taxable_Base,
nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
('Special Taxation Age 25 below Tax','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Special_25_below_Tax,
nvl(hoi4.org_information4,0) Certain_Insurances,
nvl(hoi4.org_information5,0) Certain_Insurances_29,
nvl(hoi4.org_information6,0) Code,
nvl(hoi4.org_information7,0) Canada,
--
nvl(hoi4.org_information8,0) Special_Canada,
-- nvl(hoi4.org_information9,0) Comp_Support, --EOY 2008
-- nvl(hoi4.org_information10,0) Comp_Support_5, --EOY 2008
nvl(hoi4.org_information11,0) Ext_Comp_Support,
nvl(hoi4.org_information12,0) Ext_Comp_Support_10,
--
nvl(pay_balance_pkg.get_value(get_defined_balance_id
('Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0)
Taxable_Base,
nvl(pay_balance_pkg.get_value(get_defined_balance_id
('Employee Tax','_LE_MONTH'),NULL,l_legal_employer_id,
NULL,NULL,NULL,l_effective_date),0) Employee_Tax,
nvl(hoi4.org_information13,0) Pension,
nvl(hoi4.org_information14,0) Ded_Pension,
nvl(hoi4.org_information15,0) Interest,
nvl(hoi4.org_information16,0) Ded_Interest,
hoi3.org_information3 Contact,
hoi5.org_information3 Phone
from
hr_organization_units ou,
hr_organization_information hoi1,
hr_organization_information hoi2,
hr_organization_information hoi3,
hr_organization_information hoi4,
hr_organization_information hoi5,
pay_assignment_actions paa,
pay_payroll_actions ppa
where
ou.organization_id=hoi1.organization_id
and hoi1.org_information_context='CLASS'
and hoi1.org_information1='HR_LEGAL_EMPLOYER'
and hoi1.organization_id=hoi2.organization_id
and hoi2.org_information_context='SE_LEGAL_EMPLOYER_DETAILS'
and hoi2.organization_id=hoi3.organization_id
and hoi3.org_information_context='SE_ORG_CONTACT_DETAILS'
and hoi3.org_information1 ='PERSON'
and hoi3.organization_id=hoi4.organization_id
and hoi4.org_information_context='SE_TAX_DECLARATION_DETAILS'
and hoi4.org_information1=l_month
and hoi4.org_information2 =l_year
and hoi4.organization_id=hoi5.organization_id
and hoi5.org_information_context='SE_ORG_CONTACT_DETAILS'
and hoi5.org_information1 ='PHONE'
and hoi5.organization_id=ou.organization_id
and ou.organization_id=l_legal_employer_id;
sqlstr := '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
ORDER BY ppf.person_id';