The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'Y'
FROM per_person_types ppt
WHERE ppt.system_person_type like 'EMP%'
AND ppt.person_type_Id = p_person_type_id;
PROCEDURE qual_insert_validate
(p_business_group_id in number
,p_qua_information_category in varchar2 default null
,p_person_id in number
,p_qua_information1 in varchar2 default null
,p_qua_information2 in varchar2 default null
) IS
l_count NUMBER;
select count(*)
into l_count
from per_qualifications pq
where pq.business_group_id = p_business_group_id
and pq.person_id = p_person_id
and pq.qua_information_category='FI'
and pq.qua_information2='Y';
END qual_insert_validate;
PROCEDURE qual_update_validate
(p_qua_information_category in varchar2 default null
,p_qualification_id in number
,p_qua_information1 in varchar2 default null
,p_qua_information2 in varchar2 default null
) IS
l_count NUMBER;
SELECT person_id,business_group_id
FROM per_qualifications
WHERE qualification_id = p_qualification_id;
select count(*)
into l_count
from per_qualifications pq
where pq.business_group_id = l_business_group_id
and pq.person_id = l_person_id
and pq.qualification_id <> p_qualification_id
and pq.qua_information_category='FI'
and pq.qua_information2='Y';
END qual_update_validate ;
SELECT business_group_id
FROM hr_organization_units
WHERE organization_id = p_organization_id;
SELECT COUNT(*)
FROM hr_organization_units o , hr_organization_information hoi ,fnd_sessions s
WHERE o.organization_id = hoi.organization_id
AND hoi.org_information_context = 'CLASS'
AND hoi.org_information1 = 'FI_LOCAL_UNIT'
AND o.business_group_id = l_business_group_id
AND TO_CHAR(o.organization_id) IN
(
SELECT hoinf.org_information1
FROM hr_organization_units org, hr_organization_information hoinf , fnd_sessions s
WHERE org.business_group_id = l_business_group_id
AND org.organization_id = hoinf.organization_id
AND hoinf.org_information_context = 'FI_LOCAL_UNITS'
AND s.session_id = userenv('sessionid')
AND s.effective_date between o.date_from and nvl(o.date_to,to_date('31/12/4712','DD/MM/YYYY'))
)
AND s.session_id = userenv('sessionid')
AND s.effective_date between o.date_from and nvl(o.date_to,to_date('31/12/4712','DD/MM/YYYY'))
AND o.organization_id = p_org_information1;
SELECT count(*)
FROM hr_organization_information hoi, hr_organization_units ou ,fnd_sessions s
WHERE (hoi.org_information_context = 'FI_LEGAL_EMPLOYER_DETAILS' or
hoi.org_information_context = 'FI_EXTERNAL_COMPANY_DETAILS')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id <> nvl(p_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1 ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_TYPES')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(p_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND hoi.org_information2 = p_org_information2;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_TYPES')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(p_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND hoi.org_information2 IS null
AND hoi.org_information3 IS null;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_DEPARTMENT_CODES')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(p_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information3 = p_org_information3
AND hoi.org_information1 = p_org_information1;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_DEPARTMENT_CODES')
AND ou.organization_id = hoi.organization_id
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND hoi.org_information2 = p_org_information2 ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_PROVIDERS')
AND ou.organization_id = hoi.organization_id
AND ou.business_group_id = l_business_group_id
AND hoi.org_information6 = p_org_information6 ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_LU_PENSION_PROVIDERS')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(p_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1 ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_ACCIDENT_PROVIDERS')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(p_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND (( fnd_date.canonical_to_date(p_org_information1) between fnd_date.canonical_to_date(hoi.org_information1) AND
nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(hoi.org_information1) AND
nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( fnd_date.canonical_to_date(hoi.org_information1) between fnd_date.canonical_to_date(p_org_information1) AND
nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(p_org_information1) AND
nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY'))));
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_LU_ACCIDENT_PROVIDERS')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(p_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND (( fnd_date.canonical_to_date(p_org_information1) between fnd_date.canonical_to_date(hoi.org_information1) AND
nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(hoi.org_information1) AND
nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( fnd_date.canonical_to_date(hoi.org_information1) between fnd_date.canonical_to_date(p_org_information1) AND
nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(p_org_information1) AND
nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY'))));
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_PROVIDERS')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(p_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND trim(hoi.org_information9) = trim(p_org_information9) ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_GROUP_DETAILS')
AND ou.organization_id = hoi.organization_id
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND hoi.org_information2 = p_org_information2 ;
select EFFECTIVE_DATE into l_session_date from fnd_sessions where SESSION_ID = userenv('SESSIONID');
PROCEDURE validate_update_org_inf
(p_effective_date IN DATE
,p_org_info_type_code IN VARCHAR2
,p_org_information_id IN NUMBER
,p_org_information1 IN VARCHAR2 DEFAULT null
,p_org_information2 IN VARCHAR2 DEFAULT null
,p_org_information3 IN VARCHAR2 DEFAULT null
,p_org_information4 IN VARCHAR2 DEFAULT null
,p_org_information5 IN VARCHAR2 DEFAULT null
,p_org_information6 IN VARCHAR2 DEFAULT null
,p_org_information7 IN VARCHAR2 DEFAULT null
,p_org_information8 IN VARCHAR2 DEFAULT null
,p_org_information9 IN VARCHAR2 DEFAULT null
) IS
l_length NUMBER ;
SELECT business_group_id
FROM hr_organization_units
where organization_id = l_organization_id;
SELECT organization_id
FROM hr_organization_information
WHERE org_information_id = p_org_information_id;
SELECT COUNT(*)
FROM hr_organization_units o , hr_organization_information hoi ,fnd_sessions s
WHERE o.organization_id = hoi.organization_id
AND hoi.org_information_context = 'CLASS'
AND hoi.org_information1 = 'FI_LOCAL_UNIT'
AND o.business_group_id = l_business_group_id
AND TO_CHAR(o.organization_id) IN
(
SELECT hoinf.org_information1
FROM hr_organization_units org, hr_organization_information hoinf ,fnd_sessions s
WHERE org.business_group_id = l_business_group_id
AND org.organization_id = hoinf.organization_id
AND org.organization_id <> l_organization_id
AND hoinf.org_information_context = 'FI_LOCAL_UNITS'
AND s.session_id = userenv('sessionid')
AND s.effective_date between o.date_from and nvl(o.date_to,to_date('31/12/4712','DD/MM/YYYY'))
)
AND s.session_id = userenv('sessionid')
AND s.effective_date between o.date_from and nvl(o.date_to,to_date('31/12/4712','DD/MM/YYYY'))
AND o.organization_id = p_org_information1;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_LEGAL_EMPLOYER_DETAILS' or
hoi.org_information_context = 'FI_EXTERNAL_COMPANY_DETAILS')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id <> nvl(l_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1 ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_TYPES')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(l_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND hoi.org_information2 = p_org_information2
AND hoi.org_information_id <> p_org_information_id ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_TYPES')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(l_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND hoi.org_information_id <> p_org_information_id
AND hoi.org_information2 IS NULL
AND hoi.org_information3 IS NULL;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_DEPARTMENT_CODES')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(l_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information3 = p_org_information3
AND hoi.org_information1 = p_org_information1
AND hoi.org_information_id <> p_org_information_id ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_DEPARTMENT_CODES')
AND ou.organization_id = hoi.organization_id
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND hoi.org_information2 = p_org_information2
AND hoi.org_information_id <> p_org_information_id ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_PROVIDERS')
AND ou.business_group_id = l_business_group_id
AND ou.organization_id = hoi.organization_id
AND hoi.org_information6 = p_org_information6
AND hoi.org_information_id <> p_org_information_id ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_PROVIDERS')
AND ou.business_group_id = l_business_group_id
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(l_organization_id , 0)
AND trim(hoi.org_information9) = trim(p_org_information9)
AND hoi.org_information_id <> p_org_information_id ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_LU_PENSION_PROVIDERS')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(l_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND hoi.org_information_id <> p_org_information_id ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_ACCIDENT_PROVIDERS')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(l_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND (( fnd_date.canonical_to_date(p_org_information1) between fnd_date.canonical_to_date(hoi.org_information1) AND
nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(hoi.org_information1) AND
nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( fnd_date.canonical_to_date(hoi.org_information1) between fnd_date.canonical_to_date(p_org_information1) AND
nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(p_org_information1) AND
nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY'))))
AND hoi.org_information_id <> p_org_information_id ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_LU_ACCIDENT_PROVIDERS')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(l_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND (( fnd_date.canonical_to_date(p_org_information1) between fnd_date.canonical_to_date(hoi.org_information1) AND
nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(hoi.org_information1) AND
nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( fnd_date.canonical_to_date(hoi.org_information1) between fnd_date.canonical_to_date(p_org_information1) AND
nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(hoi.org_information2),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(p_org_information1) AND
nvl(fnd_date.canonical_to_date(p_org_information2),to_date('31/12/4712','DD/MM/YYYY'))))
AND hoi.org_information_id <> p_org_information_id ;
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_organization_units ou
WHERE (hoi.org_information_context = 'FI_PENSION_GROUP_DETAILS')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(l_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND hoi.org_information2 = p_org_information2
AND hoi.org_information_id <> p_org_information_id ;
fnd_message.set_name('PER', 'Update');
SELECT EFFECTIVE_DATE INTO l_session_date FROM fnd_sessions WHERE SESSION_ID = userenv('SESSIONID');
END validate_update_org_inf;
SELECT business_group_id
FROM hr_organization_units
WHERE organization_id = p_organization_id;
SELECT hsc.segment12
FROM HR_ORGANIZATION_UNITS o1
,HR_ORGANIZATION_INFORMATION hoi1
,HR_ORGANIZATION_INFORMATION hoi2
,PER_ALL_ASSIGNMENTS_F paa
,HR_SOFT_CODING_KEYFLEX hsc
WHERE o1.business_group_id =l_business_group_id
and o1.organization_id = hoi1.organization_id
and hoi1.org_information_context = 'CLASS'
and hoi1.org_information1 = 'FI_LOCAL_UNIT'
AND nvl(hoi2.organization_id,-999) = p_le
and hoi2.ORG_INFORMATION_CONTEXT='FI_LOCAL_UNITS'
and o1.organization_id = hoi2.org_information1
and paa.person_id =p_person_id
AND p_effective_date BETWEEN paa.effective_start_date AND paa.effective_end_date
and paa.SOFT_CODING_KEYFLEX_ID=hsc.SOFT_CODING_KEYFLEX_ID
and o1.organization_id = hsc.segment2;
SELECT hoi3.organization_id
FROM HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
AND hoi1.organization_id = o1.organization_id
AND hoi1.organization_id = p_organization_id
AND hoi1.org_information1 = 'FI_LOCAL_UNIT'
AND hoi1.org_information_context = 'CLASS'
AND o1.organization_id = hoi2.org_information1
AND hoi2.ORG_INFORMATION_CONTEXT='FI_LOCAL_UNITS'
AND hoi2.organization_id = hoi3.organization_id
AND hoi3.ORG_INFORMATION_CONTEXT='CLASS'
AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER';
PROCEDURE UPDATE_ASG_VALIDATE
(
p_segment2 IN VARCHAR2
,p_segment12 IN VARCHAR2
,p_effective_date IN DATE
,p_assignment_id IN NUMBER)
IS
l_person_id NUMBER;
SELECT business_group_id
FROM per_all_assignments_f
where assignment_id = p_assignment_id;
SELECT hsc.segment12
FROM HR_ORGANIZATION_UNITS o1
,HR_ORGANIZATION_INFORMATION hoi1
,HR_ORGANIZATION_INFORMATION hoi2
,PER_ALL_ASSIGNMENTS_F paa
,HR_SOFT_CODING_KEYFLEX hsc
WHERE o1.business_group_id =l_business_group_id
and o1.organization_id = hoi1.organization_id
and hoi1.org_information_context = 'CLASS'
and hoi1.org_information1 = 'FI_LOCAL_UNIT'
AND nvl(hoi2.organization_id,-999) = p_le
and hoi2.ORG_INFORMATION_CONTEXT='FI_LOCAL_UNITS'
and o1.organization_id = hoi2.org_information1
and paa.person_id =l_person_id
and paa.assignment_id <> p_assignment_id
AND p_effective_date BETWEEN paa.effective_start_date AND paa.effective_end_date
and paa.SOFT_CODING_KEYFLEX_ID=hsc.SOFT_CODING_KEYFLEX_ID
and o1.organization_id = hsc.segment2;
SELECT hoi3.organization_id
FROM HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
AND hoi1.organization_id = o1.organization_id
AND hoi1.organization_id = p_segment2
AND hoi1.org_information1 = 'FI_LOCAL_UNIT'
AND hoi1.org_information_context = 'CLASS'
AND o1.organization_id = hoi2.org_information1
AND hoi2.ORG_INFORMATION_CONTEXT='FI_LOCAL_UNITS'
AND hoi2.organization_id = hoi3.organization_id
AND hoi3.ORG_INFORMATION_CONTEXT='CLASS'
AND hoi3.org_information1 = 'HR_LEGAL_EMPLOYER';
SELECT person_id
FROM per_all_assignments_f a
WHERE a.assignment_id = p_assignment_id
AND p_effective_date BETWEEN a.effective_start_date AND a.effective_end_date;
END UPDATE_ASG_VALIDATE ;
PROCEDURE UPDATE_TERMINATION_VALIDATE
(p_leaving_reason IN VARCHAR2
)IS
BEGIN
--
-- Added for GSI Bug 5472781
--
IF hr_utility.chk_product_install('Oracle Human Resources', 'FI') THEN
--
IF p_leaving_reason IS NULL THEN
fnd_message.set_name('PER', 'HR_376603_FI_MANDATORY_MSG');
END UPDATE_TERMINATION_VALIDATE ;
SELECT INTERNAL_EXTERNAL_FLAG
FROM HR_ORGANIZATION_UNITS
WHERE ORGANIZATION_ID = P_ORGANIZATION_ID;
select min(effective_start_date)
from per_all_people_f
where person_id=p_person_id;
PROCEDURE PERSON_ABSENCE_UPDATE
(
p_absence_attendance_id IN Number
,p_abs_information_category IN varchar2
,p_date_start IN Date
,p_date_end IN Date
,p_abs_information1 IN Varchar2 default NULL
,p_abs_information2 IN Varchar2 default NULL
,p_abs_information3 IN Varchar2 default NULL
,p_abs_information4 IN Varchar2 default NULL
,p_abs_information5 IN Varchar2 default NULL
) IS
cursor get_start_date(l_person_id number) is
select min(effective_start_date)
from per_all_people_f
where person_id=l_person_id;
select person_id
from per_absence_attendances
where absence_attendance_id =p_absence_attendance_id;
END PERSON_ABSENCE_UPDATE;