GPCH_SRCH_VW(SQL View) |
Index Back |
---|---|
Search View For GPCHThis view is used as a search view to select person records for you to use when you access a panel. This view shows you records only for persons in departments that your operator class is allowed to a ccess. All PER_ORG Types are returned. This View will Return Rows based on Multi contract legal RCd exists or not for GPCH . |
SELECT OPRID , E.EMPLID , EMPL_RCD , EMPL_RCD , COMPANY , NAME_DISPLAY , NAME_DISPLAY_SRCH , LAST_NAME_SRCH , NAME_AC , MIDDLE_NAME , E.NATIONAL_ID , F.NATIONAL_ID , NAME , SECOND_LAST_SRCH , FIRST_NAME , LAST_NAME , SECOND_LAST_NAME , ROWSECCLASS , NAME_DISPLAY , PER_ORG , POI_TYPE , BUSINESS_UNIT , SETID_DEPT , DEPTID , SETID_LOCATION , LOCATION , REG_REGION , INSTITUTION , HR_STATUS , MILITARY_SERVICE , MIL_RANK , MIL_WORN_RANK , APPT_TYPE , EMPL_STATUS , OTHER_ID_JPN , FUTURE_FLG , REPORTS_TO , SUPERVISOR_ID , SETID_JOBCODE , JOBCODE , PAY_SYSTEM_FLG , PAYGROUP , GP_PAYGROUP ,'N' FROM PS_EMPLMT_SRCH_GBL E ,PS_PERS_NID F WHERE NOT EXISTS ( SELECT 'X' FROM PS_GPCH_MC_COMPANY M WHERE M.COMPANY=E.COMPANY AND M.GPCH_MC_ENABLE ='Y' AND M.EFFDT =( SELECT MAX(K.EFFDT) FROM PS_GPCH_MC_COMPANY K WHERE K.COMPANY=M.COMPANY)) AND E.EMPLID=F.EMPLID AND F.NATIONAL_ID_TYPE ='NNSS' UNION SELECT OPRID , E.EMPLID , EMPL_RCD , EMPL_RCD , COMPANY , NAME_DISPLAY , NAME_DISPLAY_SRCH , LAST_NAME_SRCH , NAME_AC , MIDDLE_NAME , E.NATIONAL_ID , '' , NAME , SECOND_LAST_SRCH , FIRST_NAME , LAST_NAME , SECOND_LAST_NAME , ROWSECCLASS , NAME_DISPLAY , PER_ORG , POI_TYPE , BUSINESS_UNIT , SETID_DEPT , DEPTID , SETID_LOCATION , LOCATION , REG_REGION , INSTITUTION , HR_STATUS , MILITARY_SERVICE , MIL_RANK , MIL_WORN_RANK , APPT_TYPE , EMPL_STATUS , OTHER_ID_JPN , FUTURE_FLG , REPORTS_TO , SUPERVISOR_ID , SETID_JOBCODE , JOBCODE , PAY_SYSTEM_FLG , PAYGROUP , GP_PAYGROUP ,'N' FROM PS_EMPLMT_SRCH_GBL E ,PS_PERS_NID F WHERE NOT EXISTS ( SELECT 'X' FROM PS_GPCH_MC_COMPANY M WHERE M.COMPANY=E.COMPANY AND M.GPCH_MC_ENABLE ='Y' AND M.EFFDT =( SELECT MAX(K.EFFDT) FROM PS_GPCH_MC_COMPANY K WHERE K.COMPANY=M.COMPANY)) AND E.EMPLID=F.EMPLID AND F.NATIONAL_ID_TYPE <>'NNSS' AND F.EMPLID NOT IN ( SELECT G.EMPLID FROM PS_PERS_NID G WHERE G.EMPLID =F.EMPLID AND G.NATIONAL_ID_TYPE = 'NNSS') UNION SELECT P.OPRID , P.EMPLID , N.GPCH_MC_LEGAL_RCD , P.EMPL_RCD , P.COMPANY , P.NAME_DISPLAY , P.NAME_DISPLAY_SRCH , P.LAST_NAME_SRCH , P.NAME_AC , P.MIDDLE_NAME , P.NATIONAL_ID ,F.NATIONAL_ID , P.NAME , P.SECOND_LAST_SRCH , P.FIRST_NAME , P.LAST_NAME , P.SECOND_LAST_NAME , P.ROWSECCLASS , P.NAME_DISPLAY , P.PER_ORG , P.POI_TYPE , P.BUSINESS_UNIT , P.SETID_DEPT , P.DEPTID , P.SETID_LOCATION , P.LOCATION , P.REG_REGION , P.INSTITUTION , P.HR_STATUS , P.MILITARY_SERVICE , P.MIL_RANK , P.MIL_WORN_RANK , P.APPT_TYPE , P.EMPL_STATUS , P.OTHER_ID_JPN , P.FUTURE_FLG , P.REPORTS_TO , P.SUPERVISOR_ID , P.SETID_JOBCODE , P.JOBCODE , P.PAY_SYSTEM_FLG , P.PAYGROUP , P.GP_PAYGROUP ,'Y' FROM PS_EMPLMT_SRCH_GBL P ,PS_GPCH_MC_COMPANY N ,PS_PERS_NID F WHERE EXISTS ( SELECT 'X' FROM PS_GPCH_MC_COMPANY M WHERE M.COMPANY=P.COMPANY AND M.GPCH_MC_ENABLE ='Y' AND M.EFFDT =( SELECT MAX(K.EFFDT) FROM PS_GPCH_MC_COMPANY K WHERE K.COMPANY=M.COMPANY) AND ((P.EMPL_RCD = M.GPCH_MC_LEGAL_RCD AND P.HR_STATUS ='A') OR (P.HR_STATUS ='A' AND NOT EXISTS ( SELECT 'X' FROM PS_JOB J WHERE J.EMPLID=P.EMPLID AND (J.EMPL_RCD =M.GPCH_MC_LEGAL_RCD AND J.HR_STATUS ='A' AND J.EFFDT =( SELECT MAX(EFFDT) FROM PS_JOB S WHERE S.EMPLID=J.EMPLID AND S.EMPL_RCD=J.EMPL_RCD AND S.EFFDT <=%CurrentDateIn)))) OR (P.HR_STATUS = 'I' AND (P.EMPLID NOT IN ( SELECT EMPLID FROM PS_JOB T WHERE T.HR_STATUS ='A' AND NOT EXISTS ( SELECT 'X' FROM PS_JOB R WHERE T.EMPLID=R.EMPLID AND T.EMPL_RCD =R.EMPL_RCD AND R.HR_STATUS ='I' AND R.EFFDT > T.EFFDT AND R.EFFDT <=%CurrentDateIn))) AND (((P.EMPL_RCD = M.GPCH_MC_LEGAL_RCD) OR NOT EXISTS ( SELECT 'X' FROM PS_JOB L WHERE L.EMPLID=P.EMPLID AND L.EMPL_RCD = M.GPCH_MC_LEGAL_RCD AND L.HR_STATUS = 'I' AND L.EFFDT =( SELECT MAX(T2.EFFDT) FROM PS_JOB T2 WHERE T2.EMPLID = L.EMPLID AND T2.HR_STATUS ='I' AND T2.EFFDT <=%CurrentDateIn AND T2.EMPLID NOT IN ( SELECT EMPLID FROM PS_JOB Z WHERE Z.HR_STATUS ='A' AND NOT EXISTS ( SELECT 'X' FROM PS_JOB Y WHERE Z.EMPLID=Y.EMPLID AND Z.EMPL_RCD =Y.EMPL_RCD AND Y.HR_STATUS ='I' AND Y.EFFDT > Z.EFFDT AND Y.EFFDT <=%CurrentDateIn))))) AND EXISTS ( SELECT 'X' FROM PS_Job Z1 WHERE Z1.EMPLID=P.EMPLID AND Z1.EMPL_RCD = P.EMPL_RCD AND Z1.EFFDT = ( SELECT MAX(T2.EFFDT) FROM PS_JOB T2 WHERE T2.EMPLID = Z1.EMPLID AND T2.HR_STATUS ='I' AND T2.EFFDT <=%CurrentDateIn AND T2.EMPLID NOT IN ( SELECT EMPLID FROM PS_JOB Z WHERE Z.HR_STATUS ='A' AND NOT EXISTS ( SELECT 'X' FROM PS_JOB Y WHERE Z.EMPLID=Y.EMPLID AND Z.EMPL_RCD =Y.EMPL_RCD AND Y.HR_STATUS ='I' AND Y.EFFDT > Z.EFFDT AND Y.EFFDT <=%CurrentDateIn)))))))) AND N.COMPANY=P.COMPANY AND N.GPCH_MC_ENABLE ='Y' AND N.EFFDT =( SELECT MAX(L.EFFDT) FROM PS_GPCH_MC_COMPANY L WHERE L.COMPANY=N.COMPANY) AND P.EMPLID=F.EMPLID AND F.NATIONAL_ID_TYPE ='NNSS' UNION SELECT P.OPRID , P.EMPLID , N.GPCH_MC_LEGAL_RCD , P.EMPL_RCD , P.COMPANY , P.NAME_DISPLAY , P.NAME_DISPLAY_SRCH , P.LAST_NAME_SRCH , P.NAME_AC , P.MIDDLE_NAME , P.NATIONAL_ID ,'' , P.NAME , P.SECOND_LAST_SRCH , P.FIRST_NAME , P.LAST_NAME , P.SECOND_LAST_NAME , P.ROWSECCLASS , P.NAME_DISPLAY , P.PER_ORG , P.POI_TYPE , P.BUSINESS_UNIT , P.SETID_DEPT , P.DEPTID , P.SETID_LOCATION , P.LOCATION , P.REG_REGION , P.INSTITUTION , P.HR_STATUS , P.MILITARY_SERVICE , P.MIL_RANK , P.MIL_WORN_RANK , P.APPT_TYPE , P.EMPL_STATUS , P.OTHER_ID_JPN , P.FUTURE_FLG , P.REPORTS_TO , P.SUPERVISOR_ID , P.SETID_JOBCODE , P.JOBCODE , P.PAY_SYSTEM_FLG , P.PAYGROUP , P.GP_PAYGROUP ,'Y' FROM PS_EMPLMT_SRCH_GBL P ,PS_GPCH_MC_COMPANY N ,PS_PERS_NID F WHERE EXISTS ( SELECT 'X' FROM PS_GPCH_MC_COMPANY M WHERE M.COMPANY=P.COMPANY AND M.GPCH_MC_ENABLE ='Y' AND M.EFFDT =( SELECT MAX(K.EFFDT) FROM PS_GPCH_MC_COMPANY K WHERE K.COMPANY=M.COMPANY) AND ((P.EMPL_RCD = M.GPCH_MC_LEGAL_RCD AND P.HR_STATUS ='A') OR (P.HR_STATUS ='A' AND NOT EXISTS ( SELECT 'X' FROM PS_JOB J WHERE J.EMPLID=P.EMPLID AND (J.EMPL_RCD =M.GPCH_MC_LEGAL_RCD AND J.HR_STATUS ='A' AND J.EFFDT =( SELECT MAX(EFFDT) FROM PS_JOB S WHERE S.EMPLID=J.EMPLID AND S.EMPL_RCD=J.EMPL_RCD AND S.EFFDT <=%CurrentDateIn)))) OR (P.HR_STATUS = 'I' AND (P.EMPLID NOT IN ( SELECT EMPLID FROM PS_JOB T WHERE T.HR_STATUS ='A' AND NOT EXISTS ( SELECT 'X' FROM PS_JOB R WHERE T.EMPLID=R.EMPLID AND T.EMPL_RCD =R.EMPL_RCD AND R.HR_STATUS ='I' AND R.EFFDT > T.EFFDT AND R.EFFDT <=%CurrentDateIn))) AND (((P.EMPL_RCD = M.GPCH_MC_LEGAL_RCD) OR NOT EXISTS ( SELECT 'X' FROM PS_JOB L WHERE L.EMPLID=P.EMPLID AND L.EMPL_RCD = M.GPCH_MC_LEGAL_RCD AND L.HR_STATUS = 'I' AND L.EFFDT =( SELECT MAX(T2.EFFDT) FROM PS_JOB T2 WHERE T2.EMPLID = L.EMPLID AND T2.HR_STATUS ='I' AND T2.EFFDT <=%CurrentDateIn AND T2.EMPLID NOT IN ( SELECT EMPLID FROM PS_JOB Z WHERE Z.HR_STATUS ='A' AND NOT EXISTS ( SELECT 'X' FROM PS_JOB Y WHERE Z.EMPLID=Y.EMPLID AND Z.EMPL_RCD =Y.EMPL_RCD AND Y.HR_STATUS ='I' AND Y.EFFDT > Z.EFFDT AND Y.EFFDT <=%CurrentDateIn))))) AND EXISTS ( SELECT 'X' FROM PS_Job Z1 WHERE Z1.EMPLID=P.EMPLID AND Z1.EMPL_RCD = P.EMPL_RCD AND Z1.EFFDT = ( SELECT MAX(T2.EFFDT) FROM PS_JOB T2 WHERE T2.EMPLID = Z1.EMPLID AND T2.HR_STATUS ='I' AND T2.EFFDT <=%CurrentDateIn AND T2.EMPLID NOT IN ( SELECT EMPLID FROM PS_JOB Z WHERE Z.HR_STATUS ='A' AND NOT EXISTS ( SELECT 'X' FROM PS_JOB Y WHERE Z.EMPLID=Y.EMPLID AND Z.EMPL_RCD =Y.EMPL_RCD AND Y.HR_STATUS ='I' AND Y.EFFDT > Z.EFFDT AND Y.EFFDT <=%CurrentDateIn)))))))) AND N.COMPANY=P.COMPANY AND N.GPCH_MC_ENABLE ='Y' AND N.EFFDT =( SELECT MAX(L.EFFDT) FROM PS_GPCH_MC_COMPANY L WHERE L.COMPANY=N.COMPANY) AND P.EMPLID=F.EMPLID AND F.NATIONAL_ID_TYPE <>'NNSS' AND F.EMPLID NOT IN ( SELECT G.EMPLID FROM PS_PERS_NID G WHERE G.EMPLID =F.EMPLID AND G.NATIONAL_ID_TYPE = 'NNSS') |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | OPRID | Character(30) | VARCHAR2(30) NOT NULL | A user's ID (see PSOPRDEFN). |
2 | EMPLID | Character(11) | VARCHAR2(11) NOT NULL | Employee ID |
3 | EMPL_RCD | Number(3,0) | SMALLINT NOT NULL | Empl Record |
4 | GPCH_REF_EMPL_RCD | Number(3,0) | SMALLINT NOT NULL | GPCH reference EMPL_RCD |
5 | COMPANY | Character(3) | VARCHAR2(3) NOT NULL | Company |
6 | NAME | Character(50) | VARCHAR2(50) NOT NULL | Name |
7 | NAME_DISPLAY_SRCH | Character(50) | VARCHAR2(50) NOT NULL | Uppercase version of Name to improve performance on searches. |
8 | LAST_NAME_SRCH | Character(30) | VARCHAR2(30) NOT NULL | Last Name |
9 | NAME_AC | Character(50) | VARCHAR2(50) NOT NULL | Alternate Character Name |
10 | MIDDLE_NAME | Character(30) | VARCHAR2(30) NOT NULL | MIDDLE_NAME |
11 | NATIONAL_ID | Character(20) | VARCHAR2(20) NOT NULL | National ID |
12 | GPCH_AH_NNSS | Character(20) | VARCHAR2(20) NOT NULL | New Social Insurance ID |
13 | NAME_PSFORMAT | Character(50) | VARCHAR2(50) NOT NULL | A Person's name in the Peoplesoft Format (basically LN,FN MI |
14 | SECOND_LAST_SRCH | Character(30) | VARCHAR2(30) NOT NULL | Second Last Name |
15 | FIRST_NAME | Character(30) | VARCHAR2(30) NOT NULL | First Name |
16 | LAST_NAME | Character(30) | VARCHAR2(30) NOT NULL | Last Name |
17 | SECOND_LAST_NAME | Character(30) | VARCHAR2(30) NOT NULL | Second Last Name |
18 | ROWSECCLASS | Character(30) | VARCHAR2(30) NOT NULL | The class used to determine row level security |
19 | NAME_DISPLAY | Character(50) | VARCHAR2(50) NOT NULL | Display Name - name formatted for Display based on the Country |
20 | PER_ORG | Character(3) | VARCHAR2(3) NOT NULL |
Defines the Organizational Relationship(s) that a Person has to the Organization. These are Employee, Contingent Worker, and Persons of Interest.
CWR=Contingent Worker EMP=Employee POI=Person of Interest |
21 | POI_TYPE | Character(5) | VARCHAR2(5) NOT NULL | Defines the Transactional usage of POIs in HRMS. |
22 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
23 | SETID_DEPT | Character(5) | VARCHAR2(5) NOT NULL |
Department Set ID
Prompt Table: SETID_TBL |
24 | DEPTID | Character(10) | VARCHAR2(10) NOT NULL |
Department
Prompt Table: PERS_DEPT_VW |
25 | SETID_LOCATION | Character(5) | VARCHAR2(5) NOT NULL | Location Set ID |
26 | LOCATION | Character(10) | VARCHAR2(10) NOT NULL | Location Code |
27 | REG_REGION | Character(5) | VARCHAR2(5) NOT NULL | Regulatory Region |
28 | INSTITUTION | Character(5) | VARCHAR2(5) NOT NULL | Academic Institution |
29 | HR_STATUS | Character(1) | VARCHAR2(1) NOT NULL |
HR Status
A=Active I=Inactive |
30 | MILITARY_SERVICE | Character(8) | VARCHAR2(8) NOT NULL |
Military Service
Prompt Table: MIL_SERVICE_TBL |
31 | MIL_RANK | Character(5) | VARCHAR2(5) NOT NULL |
Military Rank
Prompt Table: MIL_RANK_TBL |
32 | MIL_WORN_RANK | Character(5) | VARCHAR2(5) NOT NULL |
Worn Rank
Prompt Table: MIL_RANK_TBL |
33 | APPT_TYPE | Character(1) | VARCHAR2(1) NOT NULL |
This field tracks whether a row is a Main Appointment (which all rows outside Japan are), or an Additional Appointment, which is a feature only used by Japanese customers.
0=Core Appointment 1=Japan Kenmu Appointment 2=French Public Sector Appt 3=Staffing |
34 | EMPL_STATUS | Character(1) | VARCHAR2(1) NOT NULL |
Payroll Status
A=Active D=Deceased L=Leave of Absence P=Leave With Pay Q=Retired With Pay R=Retired S=Suspended T=Terminated U=Terminated With Pay V=Terminated Pension Pay Out W=Short Work Break X=Retired-Pension Administration |
35 | OTHER_ID_JPN | Character(11) | VARCHAR2(11) NOT NULL | Other Identifier |
36 | FUTURE_FLG | Character(1) | VARCHAR2(1) NOT NULL | Flag for the SJT_*** record that indicates whether this is a future dated row or not. Y = Future N = Current |
37 | REPORTS_TO | Character(8) | VARCHAR2(8) NOT NULL | Reports To Position Number |
38 | SUPERVISOR_ID | Character(11) | VARCHAR2(11) NOT NULL | Supervisor ID |
39 | SETID_JOBCODE | Character(5) | VARCHAR2(5) NOT NULL | Job Code Set ID |
40 | JOBCODE | Character(6) | VARCHAR2(6) NOT NULL | Job Code |
41 | PAY_SYSTEM_FLG | Character(2) | VARCHAR2(2) NOT NULL |
Payroll System
GP=Global Payroll NA=Payroll for North America OT=Other PI=Payroll Interface |
42 | PAYGROUP | Character(3) | VARCHAR2(3) NOT NULL | Pay Group |
43 | GP_PAYGROUP | Character(10) | VARCHAR2(10) NOT NULL | Global Payroll pay group |
44 | GPCH_MC_ENABLE | Character(1) | VARCHAR2(1) NOT NULL | Enable Multi Contract |