HR_RMWRK_VW(SQL View) |
Index Back |
---|---|
Job Data Temp RecordView to extract job data and remote request information for active employees |
SELECT A.EMPLID , A. EMPL_RCD , A.DEPTID ,A.JOBCODE ,A.POSITION_NBR ,A.REG_TEMP ,A.FULL_PART_TIME ,A.BUSINESS_UNIT ,A.PER_ORG ,A.LOCATION , ' ' , COALESCE(C.DESCR ,' ' ) , A.REG_REGION , COALESCE(E.DESCR ,' ') , COALESCE(F.DESCR ,' ') , N.NAME , N.LAST_NAME , N.FIRST_NAME , N.MIDDLE_NAME , N.SECOND_LAST_NAME , N.NAME_AC , N.NAME_DISPLAY ,CASE WHEN COALESCE(A.LASTUPDDTTM ,%DateTimeIn('1900-01-01-00.00.00.000000')) > COALESCE(RW.LASTUPDDTTM ,%DateTimeIn('1900-01-01-00.00.00.000000')) THEN COALESCE(A.LASTUPDDTTM ,%DateTimeIn('1900-01-01-00.00.00.000000')) ELSE COALESCE(RW.LASTUPDDTTM ,%DateTimeIn('1900-01-01-00.00.00.000000')) END ,D.DESCR50 ,A.PAYGROUP ,A.GP_PAYGROUP ,A.PAY_SYSTEM_FLG , COALESCE(I.DESCR ,' ' ) ,COALESCE(M.DESCR ,' ' ) ,A. ABSENCE_SYSTEM_CD ,A.COMPANY ,COALESCE(J.XLATLONGNAME ,' ' ) ,A.ESTABID ,K.HR_SRCH_ABS_STM_CD ,COALESCE(J.XLATLONGNAME ,' ' ) ,COALESCE(K.XLATLONGNAME ,' ' ) ,N.LAST_NAME_SRCH ,N.SECOND_LAST_SRCH ,N.NAME_DISPLAY ,A.SUPERVISOR_ID ,A.REPORTS_TO ,A.ACTION ,A.ACTION_REASON ,A.HR_STATUS ,A.EMPL_STATUS ,A.EMPL_TYPE ,N.PREF_FIRST_NAME ,%Coalesce(( SELECT N.NAME_DISPLAY FROM PS_NAMES N WHERE N.EMPLID = A.SUPERVISOR_ID AND N.NAME_TYPE = 'PRI' AND N.EFFDT = ( SELECT MAX(N1.EFFDT) FROM PS_NAMES N1 WHERE N1.EMPLID = N.EMPLID AND N1.NAME_TYPE = 'PRI' AND N1.EFFDT <= %CurrentDateIn )),' ') ,%Coalesce (( SELECT P.DESCR FROM PS_POSITION_DATA P WHERE P.POSITION_NBR=A.REPORTS_TO AND P.EFFDT=( SELECT MAX(EFFDT) FROM PS_POSITION_DATA P2 WHERE P.POSITION_NBR=P2.POSITION_NBR AND P2.EFFDT<=%CurrentDateIn AND P2.EFF_STATUS = 'A')),' ') ,PORG.BUSINESS_TITLE ,%Coalesce(M3.MILITARY_SERVICE,' ') ,%Coalesce(M1.MIL_RANK,' ') ,%Coalesce(M1.MIL_WORN_RANK,' ') ,%Coalesce(( SELECT A2.DESCR FROM PS_BUS_UNIT_TBL_HR A2 WHERE A.BUSINESS_UNIT = A2.BUSINESS_UNIT),' ') ,A.FLSA_STATUS ,RW.START_DATE ,%Coalesce(RW.HR_RW_TYPE , 'X') ,'reason' ,%Coalesce(RW.HR_RW_LOC_TYPE ,' ') ,%Coalesce(RW.HR_RW_LOCATION ,' ') ,%Coalesce(RW.RW_PERCENT ,0) ,%Coalesce(RW.RW_PERCENT_DESCR ,' ') ,%Coalesce(RW.RW_TYPE_DESCR ,'Not Remote') ,%Coalesce(RW.RW_DAY1,' ') ,%Coalesce(RW.RW_DAY2,' ') ,%Coalesce(RW.RW_DAY3,' ') ,%Coalesce(RW.RW_DAY4 ,' ') ,%Coalesce(RW.RW_DAY5 ,' ') ,%Coalesce(RW.RW_DAY6 ,' ') ,%Coalesce(RW.RW_DAY7 ,' ') ,'A' FROM (((((((((PS_JOB A LEFT OUTER JOIN PS_PAYGROUP_TBL I ON I.COMPANY = A.COMPANY AND I.PAYGROUP = A.PAYGROUP ) LEFT OUTER JOIN PS_GP_SRCH_PAYSTM J ON J.PAY_SYSTEM_FLG = A.PAY_SYSTEM_FLG ) LEFT OUTER JOIN PS_HR_SRCH_ABS_STM K ON K.HR_SRCH_ABS_STM_CD = A.ABSENCE_SYSTEM_CD) LEFT OUTER JOIN PS_GP_PYGRP M ON M.GP_PAYGROUP = A.GP_PAYGROUP) LEFT OUTER JOIN PS_JOB_MIL M1 ON (A.EMPLID=M1.EMPLID AND A.EMPL_RCD=M1.EMPL_RCD AND A.EFFDT=M1.EFFDT AND A.EFFSEQ=M1.EFFSEQ)) LEFT OUTER JOIN PS_JOB_MIL_ASGN_VW M2 ON (A.EMPLID=M2.EMPLID AND A.EMPL_RCD=M2.EMPL_RCD)) LEFT OUTER JOIN PS_MIL_RANK_TBL M3 ON (M3.MILITARY_SERVICE=M2.MILITARY_SERVICE AND M3.MIL_RANK=M1.MIL_RANK))LEFT OUTER JOIN PS_HR_RMWRK_DAT RW ON RW.EMPLID=A.EMPLID AND A.EMPL_RCD=RW.EMPL_RCD)LEFT OUTER JOIN ( SELECT * FROM PS_LOCATION_TBL C WHERE C.EFFDT = ( SELECT MAX(C1.EFFDT) FROM PS_LOCATION_TBL C1 WHERE C1.SETID = C.SETID AND C1.LOCATION = C.LOCATION AND C1.EFFDT <= %CurrentDateIn))C ON C.SETID = A.SETID_LOCATION AND C.LOCATION = A.LOCATION ) , PS_DEPT_TBL E , PS_JOBCODE_TBL F,PS_REG_REGION_TBL D , PS_COMPANY_TBL L , PS_NAMES N ,PS_PER_ORG_ASGN PORG WHERE A.EFFDT = ( SELECT MAX(A_ED.EFFDT) FROM PS_JOB A_ED WHERE A.EMPLID = A_ED.EMPLID AND A.EMPL_RCD = A_ED.EMPL_RCD AND A_ED.EFFDT <=%CurrentDateIn) AND A.EFFSEQ = ( SELECT MAX(A_ES.EFFSEQ) FROM PS_JOB A_ES WHERE A.EMPLID = A_ES.EMPLID AND A.EMPL_RCD = A_ES.EMPL_RCD AND A.EFFDT = A_ES.EFFDT) AND A.EMPL_RCD = ( SELECT MAX(A_ED.EMPL_RCD) FROM PS_JOB A_ED WHERE A.EMPLID = A_ED.EMPLID AND A.EMPL_RCD = A_ED.EMPL_RCD AND A.EFFDT = A_ED.EFFDT) AND N.EMPLID = A.EMPLID AND N.NAME_TYPE = 'PRI' AND N.EFFDT = ( SELECT MAX(N1.EFFDT) FROM PS_NAMES N1 WHERE N1.EMPLID = N.EMPLID AND N1.NAME_TYPE = 'PRI' AND N1.EFFDT <= %CurrentDateIn ) AND L.COMPANY = A.COMPANY AND D.REG_REGION = A.REG_REGION AND A.EMPLID=PORG.EMPLID AND A.EMPLID=N.EMPLID AND A.EMPL_RCD=PORG.EMPL_RCD AND E.SETID = A.SETID_DEPT AND E.DEPTID = A.DEPTID AND E.EFFDT = ( SELECT MAX(E_ED.EFFDT) FROM PS_DEPT_TBL E_ED WHERE E.SETID = E_ED.SETID AND E.DEPTID = E_ED.DEPTID AND E_ED.EFFDT <= %CurrentDateIn ) AND F.SETID = A.SETID_JOBCODE AND F.JOBCODE = A.JOBCODE AND F.EFFDT = ( SELECT MAX(F_ED.EFFDT) FROM PS_JOBCODE_TBL F_ED WHERE F.SETID = F_ED.SETID AND F.JOBCODE = F_ED.JOBCODE AND F_ED.EFFDT <= %CurrentDateIn ) AND (I.EFFDT = ( SELECT MAX(I_ED.EFFDT) FROM PS_PAYGROUP_TBL I_ED WHERE I.COMPANY = I_ED.COMPANY AND I.PAYGROUP = I_ED.PAYGROUP AND I_ED.EFFDT <= %CurrentDateIn ) OR I.EFFDT IS NULL) AND L.EFFDT = ( SELECT MAX(L_ED.EFFDT) FROM PS_COMPANY_TBL L_ED WHERE L.COMPANY = L_ED.COMPANY AND L_ED.EFFDT <= A.EFFDT) |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | EMPLID | Character(11) | VARCHAR2(11) NOT NULL |
Employee ID
Default Value: PER_ORG_ASGN.EMPLID Prompt Table: PERS_SRCH_GBL |
2 | EMPL_RCD | Number(3,0) | SMALLINT NOT NULL | Empl Record |
3 | DEPTID | Character(10) | VARCHAR2(10) NOT NULL |
Department
Prompt Table: DEPT_TBL |
4 | JOBCODE | Character(6) | VARCHAR2(6) NOT NULL |
Job Code
Prompt Table: JOBCODE_TBL |
5 | POSITION_NBR | Character(8) | VARCHAR2(8) NOT NULL |
Position Number
Prompt Table: POSN_DATA_VW |
6 | REG_TEMP | Character(1) | VARCHAR2(1) NOT NULL |
Regular/Temporary
R=Regular T=Temporary Default Value: R |
7 | FULL_PART_TIME | Character(1) | VARCHAR2(1) NOT NULL |
Full/Part Time
D=On Demand F=Full-Time P=Part-Time Default Value: F |
8 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL |
Business Unit
Default Value: OPR_DEF_TBL_HR.BUSINESS_UNIT Prompt Table: BUSUNIT_HR_VW |
9 | 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 Default Value: PER_ORG_ASGN.PER_ORG |
10 | LOCATION | Character(10) | VARCHAR2(10) NOT NULL | Location Code |
11 | HR_SRCH_POS_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Position Description |
12 | HR_SRCH_LOC_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Location |
13 | REG_REGION | Character(5) | VARCHAR2(5) NOT NULL |
Regulatory Region
Default Value: OPR_DEF_TBL_HR.REG_REGION Prompt Table: REG_STANDARD_VW |
14 | HR_SRCH_DEPT_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Department |
15 | HR_SRCH_JBCD_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Job Title |
16 | NAME | Character(50) | VARCHAR2(50) NOT NULL | Name |
17 | LAST_NAME | Character(30) | VARCHAR2(30) NOT NULL | Last Name |
18 | FIRST_NAME | Character(30) | VARCHAR2(30) NOT NULL | First Name |
19 | MIDDLE_NAME | Character(30) | VARCHAR2(30) NOT NULL | MIDDLE_NAME |
20 | SECOND_LAST_NAME | Character(30) | VARCHAR2(30) NOT NULL | Second Last Name |
21 | NAME_AC | Character(50) | VARCHAR2(50) NOT NULL | Alternate Character Name |
22 | NAME_DISPLAY | Character(50) | VARCHAR2(50) NOT NULL | Display Name - name formatted for Display based on the Country |
23 | LASTUPDDTTM | DateTime(26) | TIMESTAMP |
Specifies the date and time of the last update to an entry. This field is maintained by PeopleSoft and is used in a variety of contexts.
Default Value: %datetime |
24 | DESCR50 | Character(50) | VARCHAR2(50) NOT NULL | Description of length 50 |
25 | PAYGROUP | Character(3) | VARCHAR2(3) NOT NULL |
Pay Group
Prompt Table: %EDITTABLE5 |
26 | GP_PAYGROUP | Character(10) | VARCHAR2(10) NOT NULL | Global Payroll pay group |
27 | PAY_SYSTEM_FLG | Character(2) | VARCHAR2(2) NOT NULL |
Payroll System
GP=Global Payroll NA=Payroll for North America OT=Other PI=Payroll Interface Default Value: OPR_DEF_TBL_HR.PAY_SYSTEM_FLG |
28 | HR_SRCH_PYGP_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Paygroup Description |
29 | HR_SRCH_GPPY_DESCR | Character(30) | VARCHAR2(30) NOT NULL | GP paygroup Description |
30 | ABSENCE_SYSTEM_CD | Character(3) | VARCHAR2(3) NOT NULL |
What Absence System this Assignment is tied to.
AM=Absence Management OT=Other Default Value: OT |
31 | COMPANY | Character(3) | VARCHAR2(3) NOT NULL |
Company
Prompt Table: COMPANY_TBL |
32 | HR_SRCH_GP_XLAT | Character(30) | VARCHAR2(30) NOT NULL | GP paysytem xlatlongname |
33 | ESTABID | Character(12) | VARCHAR2(12) NOT NULL | Establishment ID |
34 | HR_SRCH_ABS_STM_CD | Character(3) | VARCHAR2(3) NOT NULL | SES: Absence system code referenced in HR_SRCH_JOBDATA query |
35 | HR_SRCH_ABS_XLAT | Character(30) | VARCHAR2(30) NOT NULL | Abs paysytem xlatlongname |
36 | HR_SRCH_CMP_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Company Descr |
37 | LAST_NAME_SRCH | Character(30) | VARCHAR2(30) NOT NULL | Last Name |
38 | SECOND_LAST_SRCH | Character(30) | VARCHAR2(30) NOT NULL | Second Last Name |
39 | NAME_DISPLAY_SRCH | Character(50) | VARCHAR2(50) NOT NULL | Uppercase version of Name to improve performance on searches. |
40 | SUPERVISOR_ID | Character(11) | VARCHAR2(11) NOT NULL | Supervisor ID |
41 | REPORTS_TO | Character(8) | VARCHAR2(8) NOT NULL | Reports To Position Number |
42 | ACTION | Character(3) | VARCHAR2(3) NOT NULL | Action |
43 | ACTION_REASON | Character(3) | VARCHAR2(3) NOT NULL | Reason Code |
44 | HR_STATUS | Character(1) | VARCHAR2(1) NOT NULL |
HR Status
A=Active I=Inactive |
45 | 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 |
46 | EMPL_TYPE | Character(1) | VARCHAR2(1) NOT NULL |
Employee Type
E=Exception Hourly H=Hourly N=Not Applicable S=Salaried |
47 | PREF_FIRST_NAME | Character(30) | VARCHAR2(30) NOT NULL | Preferred First Name |
48 | SUPERVISOR_NAME | Character(50) | VARCHAR2(50) NOT NULL | Supervisor Name |
49 | REPORTS_TO_DESCR | Character(50) | VARCHAR2(50) NOT NULL | Reports To |
50 | BUSINESS_TITLE | Character(30) | VARCHAR2(30) NOT NULL | Business Title |
51 | MILITARY_SERVICE | Character(8) | VARCHAR2(8) NOT NULL | Military Service |
52 | MIL_RANK | Character(5) | VARCHAR2(5) NOT NULL | Military Rank |
53 | MIL_WORN_RANK | Character(5) | VARCHAR2(5) NOT NULL | Worn Rank |
54 | BUSINESS_DESCR | Character(60) | VARCHAR2(60) NOT NULL | Business Description |
55 | FLSA_STATUS | Character(1) | VARCHAR2(1) NOT NULL |
FLSA Status
A=Administrative C=Computer Employee E=Executive H=Highly Compensated Employees M=Management N=Nonexempt O=Outside Salesperson P=Professional V=Nonexempt Alt Overtime X=No FLSA Required |
56 | START_DATE | Date(10) | DATE | Start Date for Gen Standing PO |
57 | HR_RW_TYPE | Character(1) | VARCHAR2(1) NOT NULL |
Remote Worker Type(Fully remote/Hybrid)
F=Fully Remote H=Hybrid |
58 | HR_RW_REASON | Character(60) | VARCHAR2(60) NOT NULL | Remote Worker Reason |
59 | HR_RW_LOC_TYPE | Character(1) | VARCHAR2(1) NOT NULL |
Remote Worker Location Type
H=Home O=Other W=Workplace |
60 | HR_RW_LOCATION | Character(30) | VARCHAR2(30) NOT NULL | Remote Work Location |
61 | RW_PERCENT | Number(6,2) | DECIMAL(5,2) NOT NULL | Percentage |
62 | RW_PERCENT_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Remote Work Percent |
63 | RW_TYPE_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Remote Worker Type |
64 | RW_DAY1 | Character(1) | VARCHAR2(1) NOT NULL |
New fiedl to display Monday
A=Active I=Inactive |
65 | RW_DAY2 | Character(1) | VARCHAR2(1) NOT NULL |
New fiedl to display Monday
A=Active I=Inactive |
66 | RW_DAY3 | Character(1) | VARCHAR2(1) NOT NULL |
New fiedl to display Wednesday
A=Active I=Inactive |
67 | RW_DAY4 | Character(1) | VARCHAR2(1) NOT NULL |
New fiedl to display Thursday
A=Active I=Inactive |
68 | RW_DAY5 | Character(1) | VARCHAR2(1) NOT NULL |
New fiedl to display Friday
A=Active I=Inactive |
69 | RW_DAY6 | Character(1) | VARCHAR2(1) NOT NULL |
New fiedl to display Saturday
A=Active I=Inactive |
70 | RW_DAY7 | Character(1) | VARCHAR2(1) NOT NULL |
New fiedl to display Sunday
A=Active I=Inactive |
71 | WF_STATUS | Character(1) | VARCHAR2(1) NOT NULL |
Workflow Status
A=Approved C=Cancelled D=Denied E=Error. Contact Administrator. F=Awaiting final approval I=In Approval Process M=Administrator is Processing N=Not Available P=Rework S=Submitted V=Data Saved |