RS_WC_ASSGN_VW

(SQL View)
Index Back

SELECT A.EMPLID , B.NAME , G.SUPERVISOR_ID , C.POOL_ID , C.DESCR , C.MANAGER_ID , A.REGION_CD , D.ASSIGNMENT_ID , MIN(E.START_DT) , MAX(E.END_DT) , F.RS_END_DATE , D.PROJ_ROLE , D.BUSINESS_UNIT , D.PROJECT_ID , %DateDiff(%CURRENTDATEIN,MAX(E.END_DT)) FROM PS_RS_WORKER_TBL A , PS_PERSONAL_DATA B , PS_RS_RES_POOL C , PS_RS_ASSIGNMENT D , PS_RS_ASSGN_DETAIL E , PS_RS_APPOINTMENT F , PS_JOB G , PS_RS_WRKR_EFFDT H WHERE A.EMPLID = B.EMPLID AND D.EMPLID = A.EMPLID AND G.EMPLID = A.EMPLID AND H.EMPLID = A.EMPLID AND H.SYSTEM_SOURCE = 'RS' AND H.EFFDT = ( SELECT MAX(H1.EFFDT) FROM PS_RS_WRKR_EFFDT H1 WHERE H.EMPLID = H1.EMPLID AND H1.SYSTEM_SOURCE = H.SYSTEM_SOURCE) AND G.EMPL_RCD = H.EMPL_RCD AND G.EFFDT = ( SELECT MAX(G1.EFFDT) FROM PS_JOB G1 WHERE G.EMPLID = G1.EMPLID AND G.EMPL_RCD = G1.EMPL_RCD AND G1.EFFDT <= %CurrentDateIn) AND G.EFFSEQ = ( SELECT MAX(G2.EFFSEQ) FROM PS_JOB G2 WHERE G2.EMPLID = G.EMPLID AND G2.EMPL_RCD = G.EMPL_RCD AND G2.EFFDT = G.EFFDT) AND G.EMPL_STATUS NOT IN('I','T','S','D','U','V','Q','R','X') AND D.ASSIGNMENT_ID =( SELECT DISTINCT(F1.RS_APPT_ID) FROM PS_RS_APPOINTMENT F1 WHERE F1.SYSTEM_SOURCE = 'RS' AND F1.RS_APPT_TYPE = 'ASN' AND F1.EMPLID = A.EMPLID AND F1.RS_END_DATE = ( SELECT MAX(F2.RS_END_DATE) FROM PS_RS_APPOINTMENT F2 WHERE F1.EMPLID = F2.EMPLID AND F1.SYSTEM_SOURCE = F2.SYSTEM_SOURCE AND F1.RS_APPT_TYPE = F2.RS_APPT_TYPE )) AND C.POOL_ID = ( SELECT C2.POOL_ID FROM PS_RS_POOL_MEMBER C1 , PS_RS_MEMBER_DATES C2 WHERE C1.POOL_ID = C2.POOL_ID AND C1.MEMBER_ID = C2.MEMBER_ID AND C1.EMPLID = A.EMPLID AND C2.START_DATE <= %CurrentDateIn AND (C2.END_DATE IS NULL OR C2.END_DATE >= %CurrentDateIn ) ) AND E.ASSIGNMENT_ID = D.ASSIGNMENT_ID AND E.ASSIGNMENT_ID = F.RS_APPT_ID AND F.SYSTEM_SOURCE = 'RS' AND F.RS_APPT_TYPE = 'ASN' GROUP BY A.EMPLID,B.NAME,G.SUPERVISOR_ID,C.POOL_ID,C.DESCR,C.MANAGER_ID,A.REGION_CD, D.ASSIGNMENT_ID, F.RS_END_DATE ,D.PROJ_ROLE, D.BUSINESS_UNIT, D.PROJECT_ID

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
2 NAME Character(50) VARCHAR2(50) NOT NULL Name
3 SUPERVISOR_ID Character(11) VARCHAR2(11) NOT NULL Supervisor ID
4 POOL_ID Character(10) VARCHAR2(10) NOT NULL Pool ID field.
5 DESCR Character(30) VARCHAR2(30) NOT NULL Description
6 MANAGER_ID Character(11) VARCHAR2(11) NOT NULL Manager ID

Prompt Table: RS_ACT_EMPL
Set Control Field: EMPLID

7 REGION_CD Character(10) VARCHAR2(10) NOT NULL Identifies the Sales Region. Populated on the Item Table to identify the Sales Region the Item is applied to.
8 ASSIGNMENT_ID Character(15) VARCHAR2(15) NOT NULL Work Assignment ID
9 START_DT Date(10) DATE Start Date
10 END_DT Date(10) DATE End Date
11 RS_END_DATE Date(10) DATE End date
12 PROJ_ROLE Character(15) VARCHAR2(15) NOT NULL Project Role
13 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
14 PROJECT_ID Character(15) VARCHAR2(15) NOT NULL Project Id ChartField
15 DURATION Number(5,0) INTEGER NOT NULL Recurrence Duration