The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'x', hoi.org_information2
FROM hr_organization_information hoi,
hr_all_organization_units hou
WHERE hoi.org_information_context ='IE_ORG_INFORMATION'
AND hou.organization_id = hoi.organization_id
AND hoi.org_information2 = p_org_information2
AND hou.business_group_id =p_business_group_id
AND (p_org_info_id IS NULL OR hoi.org_information_id <> p_org_info_id)
AND p_effective_date <= nvl(hou.date_to,to_Date('4712/12/31','YYYY/MM/DD'))
AND exists (select 1 from hr_organization_information hoi1
where hoi1.org_information1 = 'HR_BG'
and hoi1.org_information_context = 'CLASS'
and hoi1.organization_id = hoi.organization_id
and hoi1.org_information2='Y');
SELECT 'x', hoi.org_information2
FROM hr_organization_information hoi,
hr_all_organization_units hou
WHERE hoi.org_information_context ='IE_EMPLOYER_INFO'
AND hou.organization_id = hoi.organization_id
AND hoi.org_information2 = p_org_information2
AND hou.business_group_id =p_business_group_id
AND (p_org_info_id IS NULL OR hoi.org_information_id <> p_org_info_id)
AND p_effective_date <= nvl(hou.date_to,to_Date('4712/12/31','YYYY/MM/DD'))
AND exists (select 1 from hr_organization_information hoi1
where hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi1.org_information_context = 'CLASS'
and hoi1.organization_id = hoi.organization_id
and hoi1.org_information2='Y');
cursor c_cbr_no is select cbr from (select substr(p_cbr_no ,level-0,1) cbr
from dual
connect by level
SELECT business_group_id
from hr_all_organization_units
where organization_id=p_organization_id;
PROCEDURE UPDATE_IE_ORG_INFO(p_org_info_type_code VARCHAR2
,p_org_information2 VARCHAR2
,p_org_information3 VARCHAR2
,p_org_information_id NUMBER
,p_effective_date DATE
) is
CURSOR get_business_group is
SELECT business_group_id
from hr_all_organization_units hou,hr_organization_information hoi
where hoi.org_information_id=p_org_information_id
and hoi.organization_id=hou.organization_id;
END UPDATE_IE_ORG_INFO;
PROCEDURE UPDATE_IE_ASG_INFO(P_ASSIGNMENT_ID NUMBER
,P_PAYROLL_ID NUMBER
,p_organization_id NUMBER
,P_EFFECTIVE_DATE DATE)
is
CURSOR get_business_group is
SELECT business_group_id
from hr_all_organization_units
where organization_id=p_organization_id;
select 1
from dual
where exists(select NULL
from per_all_assignments_f paa,
pay_all_payrolls_f pap,
hr_soft_coding_keyflex scl
where paa.payroll_id = pap.payroll_id
and p_effective_date not between paa.effective_start_date and paa.effective_end_date
and paa.assignment_id = p_assignment_id
and pap.payroll_id <> p_payroll_id
and pap.soft_coding_keyflex_id = scl.soft_coding_keyflex_id
and scl.segment4 <> p_segment4
and paa.effective_start_date <= pap.effective_end_date
and paa.effective_end_date >= pap.effective_start_date
);
select sck.segment4
from hr_soft_coding_keyflex sck
,pay_all_payrolls_f pay
where pay.soft_coding_keyflex_id = sck.soft_coding_keyflex_id
and pay.payroll_id = p_payroll_id
and P_EFFECTIVE_DATE between pay.effective_start_date and pay.effective_end_date
and pay.business_group_id=p_business_group_id;
END UPDATE_IE_ASG_INFO;