GM_JOB_DEPT_VW(SQL View) |
Index Back |
---|---|
Person's departmentView of JOB to obtain the department of an EMPLID. Used as default in GM_PROP_COMP. |
SELECT DISTINCT A.EMPLID , A.DEPTID FROM PS_JOB A WHERE A.EMPL_RCD = ( SELECT MIN(B.EMPL_RCD) FROM PS_JOB B WHERE A.EMPLID = B.EMPLID AND B.EMPL_RCD>= A.EMPL_RCD AND A.EFFDT = B.EFFDT AND A.EFFSEQ = B.EFFSEQ) AND A.EFFDT = ( SELECT MAX(C.EFFDT) FROM PS_JOB C WHERE A.EMPLID = C.EMPLID AND A.EMPL_RCD = C.EMPL_RCD AND C.EFFDT <= %CurrentDateIn AND A.EFFSEQ = C.EFFSEQ) AND A.EFFSEQ = ( SELECT MAX(D.EFFSEQ) FROM PS_JOB D WHERE A.EMPLID = D.EMPLID AND A.EMPL_RCD = D.EMPL_RCD AND A.EFFDT = D.EFFDT AND D.EFFSEQ <= A.EFFSEQ) |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | EMPLID | Character(11) | VARCHAR2(11) NOT NULL |
Employee ID
Prompt Table: PERSONAL_DATA |
2 | DEPTID | Character(10) | VARCHAR2(10) NOT NULL |
Department
Prompt Table: DEPT_TBL |