abdeen-ahmad
2/3/2016 - 3:08 PM

Retirement Reports

Retirement Reports

SELECT PAPF.EMPLOYEE_NUMBER,
       PAPF.FULL_NAME,
       PAPF.DATE_OF_BIRTH,
       PAPF.SEX,
       TRUNC(MONTHS_BETWEEN (SYSDATE,PAPF.DATE_OF_BIRTH)/12) YEARS,
       TRUNC(MOD(MONTHS_BETWEEN(SYSDATE,PAPF.DATE_OF_BIRTH),12)) MONTHS,
       TRUNC(SYSDATE-ADD_MONTHS(PAPF.DATE_OF_BIRTH,TRUNC(MONTHS_BETWEEN(SYSDATE,PAPF.DATE_OF_BIRTH)/12)*12+TRUNC(MOD(MONTHS_BETWEEN(SYSDATE,PAPF.DATE_OF_BIRTH),12)))) DAYS
FROM   PER_ALL_PEOPLE_F PAPF
WHERE  PAPF.EMPLOYEE_NUMBER=507