0% found this document useful (0 votes)
96 views

New SQL Techniques

This document contains 3 SQL queries. The first query selects person numbers from various tables where the employee has a probationary period template and the effective dates include today's date. The second query selects person numbers where the assignment ID matches 3 given values and the effective dates include today. The third query selects a single hard coded person number.

Uploaded by

Anonymous N2Q5M6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

New SQL Techniques

This document contains 3 SQL queries. The first query selects person numbers from various tables where the employee has a probationary period template and the effective dates include today's date. The second query selects person numbers where the assignment ID matches 3 given values and the effective dates include today. The third query selects a single hard coded person number.

Uploaded by

Anonymous N2Q5M6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

new 7 09 July 2017 13:31

--select * from ALL_OBJECTS where Object_type ='TABLE' and Object_name like 'PER_PERSON%'

SELECT PAPF.person_number
FROM HRA_EVALUATIONS HRAE ,
HRA_TMPL_PERIODS_TL HRATPL,
PER_ALL_ASSIGNMENTS_M PAAM,
PER_ALL_PEOPLE_F PAPF,
PER_PERSON_NAMES_F Ppn
WHERE HRATPL.TMPL_PERIOD_ID = HRAE.TMPL_PERIOD_ID
AND HRATPL.CUSTOMARY_NAME LIKE 'PROB%'
AND PAAM.ASSIGNMENT_ID (+) = HRAE.ASSIGNMENT_ID
AND PAPF.PERSON_ID (+)= PAAM.PERSON_ID
AND Ppn.person_id(+)=papf.person_id
AND ppn.NAME_TYPE='GLOBAL'
AND TRUNC(SYSDATE) BETWEEN PAAM.EFFECTIVE_START_DATE AND PAAM.EFFECTIVE_END_DATE
AND TRUNC(SYSDATE) BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE
AND TRUNC(SYSDATE) BETWEEN Ppn.EFFECTIVE_START_DATE AND Ppn.EFFECTIVE_END_DATE

SELECT PAPF.person_number
FROM
PER_ALL_ASSIGNMENTS_M PAAM,
PER_ALL_PEOPLE_F PAPF,

WHERE

paam.assignment_id in (300000002117755, 300000002408269, 300000002098503)


AND PAPF.PERSON_ID (+)= PAAM.PERSON_ID

AND TRUNC(SYSDATE) BETWEEN PAAM.EFFECTIVE_START_DATE AND PAAM.EFFECTIVE_END_DATE


AND TRUNC(SYSDATE) BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE

PERSON_NUMBER (70010)
G_1
PERSON_NUMBER (70016)
G_1
PERSON_NUMBER (0080)

-1-

You might also like