The following lines contain the word 'select', 'insert', 'update' or 'delete':
select count(distinct hoi2.org_information2||hoi3.org_information9) --Bug# 2822459 count(*)
from hr_organization_information hoi2,
hr_organization_information hoi3,
hr_organization_units bp2,
hr_organization_information hoi1,
hr_organization_units bp1
where bp1.organization_id = g_business_place_id --Bug 5069923
and hoi1.organization_id = bp1.organization_id
and hoi1.org_information_context = 'KR_BUSINESS_PLACE_REGISTRATION'
--Bug 5069923
and ( (report_for_var='A')
or ( (hoi2.organization_id in (select posev.ORGANIZATION_ID_child
from PER_ORG_STRUCTURE_ELEMENTS posev
where posev.org_structure_version_id=(pay_magtape_generic.get_parameter_value('ORG_STRUC_VERSION_ID'))
and exists (select null
from hr_organization_information
where organization_id = posev.ORGANIZATION_ID_child
and org_information_context = 'CLASS'
and org_information1 = 'KR_BUSINESS_PLACE'
)
start with ORGANIZATION_ID_PARENT = (decode(report_for_var,'S',null,'SUB',g_business_place_id))
connect by prior ORGANIZATION_ID_child = ORGANIZATION_ID_PARENT
)
)
or (hoi2.organization_id = g_business_place_id
)
)
)
and bp2.business_group_id = bp1.business_group_id
and hoi2.organization_id = bp2.organization_id
and hoi2.org_information_context = 'KR_BUSINESS_PLACE_REGISTRATION'
and hoi2.org_information10 = hoi1.org_information10
and hoi3.organization_id = hoi2.organization_id
and hoi3.org_information_context = 'KR_INCOME_TAX_OFFICE'
and exists(
select null
from pay_assignment_actions paa,
pay_payroll_actions ppa
where ppa.report_type = 'YEA'
and ppa.report_qualifier = 'KR'
and ppa.business_group_id = bp1.business_group_id
-- Bug 3248513
and ( (ppa.report_category in (g_normal_yea, g_interim_yea, g_re_yea)) or (ppa.payroll_action_id = g_payroll_action_id ))
and to_number(to_char(ppa.effective_date, 'YYYY')) = g_target_year
--
and ppa.action_type in ('B','X')
and paa.payroll_action_id = ppa.payroll_action_id
and paa.tax_unit_id = bp2.organization_id
and paa.action_status = 'C');
select min(fnd_date.canonical_to_date(aei.AEI_INFORMATION1)),
max(fnd_date.canonical_to_date(aei.AEI_INFORMATION2))
from per_assignment_extra_info aei
where aei.information_type in ('KR_YEA_TAX_REDUCTION_SMB','KR_YEA_TAX_REDUCTION_TEACHERS','KR_YEA_TAX_REDUCTION_MARINE')
and aei.assignment_id = p_assignment_id;
select pds.DATE_START, pds.ACTUAL_TERMINATION_DATE
from per_periods_of_service pds,
per_assignments_f asg
where asg.assignment_id = p_assignment_id
and p_effective_date between asg.effective_start_date and asg.effective_end_date
and pds.period_of_service_id = asg.period_of_service_id;
select user_entity_id
into l_user_entity_id
from ff_user_entities
where user_entity_name = p_user_entity_name
and legislation_code = 'KR'
and creator_type = 'X';