[Home] [Help]
The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT p_org_id organization_id_parent
,0 lev
FROM dual
WHERE p_org_exists_in_hierarchy = 'Y'
UNION
SELECT organization_id_parent
,level lev
FROM per_org_structure_elements
WHERE org_structure_version_id = p_org_structure_version_id
START WITH organization_id_child = p_org_id
CONNECT BY PRIOR organization_id_parent = organization_id_child
AND org_structure_version_id = p_org_structure_version_id
ORDER BY lev;
SELECT p_org_id organization_id_parent
,0 lev
FROM dual
WHERE p_org_exists_in_hierarchy = 'Y'
UNION
SELECT organization_id_parent
,level lev
FROM per_org_structure_elements
WHERE org_structure_version_id = p_org_structure_version_id
START WITH organization_id_child = p_org_id
CONNECT BY PRIOR organization_id_parent = organization_id_child
AND org_structure_version_id = p_org_structure_version_id
ORDER BY lev;
SELECT TO_NUMBER(inf.org_information1) organization_structure_id
FROM hr_organization_information inf
,hr_all_organization_units org
WHERE org.organization_id = p_organization_id
AND inf.organization_id = org.business_group_id
AND inf.org_information_context = 'SA_HR_BG_INFO'
AND inf.org_information1 IS NOT NULL;
SELECT sv.org_structure_version_id, sv.version_number
FROM per_org_structure_versions sv
,fnd_sessions ses
WHERE sv.organization_structure_id = p_organization_structure_id
AND ses.session_id = USERENV('sessionid')
AND ses.effective_date BETWEEN sv.date_from AND NVL(sv.date_to, TO_DATE('31/12/4712','DD/MM/YYYY'))
ORDER BY sv.version_number DESC;
SELECT se.organization_id_child
FROM per_org_structure_elements se
WHERE se.org_structure_version_id = p_org_structure_version_id
AND (se.organization_id_parent = p_organization_id OR
se.organization_id_child = p_organization_id);
select hou.name
from hr_organization_units hou,
hr_organization_information hoi1,
hr_organization_information hoi2
where (hou.business_group_id= p_bus_group_id
OR (hou.business_group_id=hou.organization_id and
hou.business_group_id <> p_bus_group_id )) and
trunc(sysdate) between hou.date_from and nvl(hou.date_to,
to_date('4712/12/31','YYYY/MM/DD')) and
hou.organization_id = hoi1.organization_id and
hou.organization_id = p_organization_id and
hoi1.org_information_context = 'CLASS' and
hoi1.org_information1 = 'HR_LEGAL' and
Hoi1.organization_id = hoi2.organization_id and
Hoi2.org_information_context = 'SA_EMPLOYER_GOSI_DETAILS'
order by hou.name;
select hou.name
from hr_organization_units hou,
hr_organization_information hoi1,
hr_organization_information hoi2
where (hou.business_group_id= p_bus_group_id
OR (hou.business_group_id=hou.organization_id and
hou.business_group_id <> p_bus_group_id )) and
trunc(sysdate) between hou.date_from and nvl(hou.date_to,
to_date('4712/12/31','YYYY/MM/DD')) and
hou.organization_id = hoi1.organization_id and
hou.organization_id = p_organization_id and
hoi1.org_information_context = 'CLASS' and
hoi1.org_information1 = 'HR_LEGAL' and
Hoi1.organization_id = hoi2.organization_id and
Hoi2.org_information_context = 'SA_EMPLOYER_GOSI_DETAILS'
order by hou.name;
select hou.name
from hr_organization_units hou,
hr_organization_information hoi1,
hr_organization_information hoi2
where (hou.business_group_id= p_bus_group_id
OR (hou.business_group_id=hou.organization_id and
hou.business_group_id <> p_bus_group_id )) and
trunc(sysdate) between hou.date_from and nvl(hou.date_to,
to_date('4712/12/31','YYYY/MM/DD')) and
hou.organization_id = hoi1.organization_id and
hou.organization_id = p_organization_id and
hoi1.org_information_context = 'CLASS' and
hoi1.org_information1 = 'HR_LEGAL' and
Hoi1.organization_id = hoi2.organization_id and
Hoi2.org_information_context = 'SA_EMPLOYER_GOSI_DETAILS'
order by hou.name;