TRN_CMPESTEE_VW(SQL View) |
Index Back |
---|---|
Company-Estab ViewThis View retrives Employees based on the Company and Establishment |
SELECT C.BUDGET_PERIOD , D.BUSINESS_UNIT , B.COMPANY , B.ESTABID , A.EMPLID , A.NAME FROM PS_PERSON_NAME A , PS_JOB B , PS_BUDGET_PERIOD C ,PS_BUDGET_BUS_UNIT D WHERE A.EMPLID = B.EMPLID AND B.BUSINESS_UNIT=D.BUSINESS_UNIT AND D.BUDGET_PERIOD=C.BUDGET_PERIOD AND B.EFFDT = ( SELECT MAX(D1.EFFDT) FROM PS_JOB D1 WHERE D1.EMPLID = B.EMPLID AND D1.EMPL_RCD = B.EMPL_RCD AND D1.EFFDT<=C.THRU_DATE) AND B.EFFSEQ = ( SELECT MAX(EFFSEQ) FROM PS_JOB WHERE EMPLID = B.EMPLID AND EMPL_RCD = B.EMPL_RCD AND EFFDT = B.EFFDT) AND B.JOB_INDICATOR = 'P' |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUDGET_PERIOD | Character(10) | VARCHAR2(10) NOT NULL | Budget Period |
2 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
3 | COMPANY | Character(3) | VARCHAR2(3) NOT NULL | Company |
4 | ESTABID | Character(12) | VARCHAR2(12) NOT NULL | Establishment ID |
5 | EMPLID | Character(11) | VARCHAR2(11) NOT NULL | Employee ID |
6 | NAME | Character(50) | VARCHAR2(50) NOT NULL | Name |