PY_THSHLD_GR_VW(SQL View) |
Index Back |
---|---|
Payroll Total Gross ThresholdThis will show the total gross on a paycheck which exceeds the threshold amount for active employees for Payroll WorkCenter. |
SELECT B.COMPANY , B.PAYGROUP , B.PAY_END_DT , B.OFF_CYCLE , B.PAGE_NUM , B.LINE_NUM , B.SEPCHK , B.EMPLID , B.EMPL_RCD , B.NAME , B.TOTAL_GROSS , B.DEPTID , B.BUSINESS_UNIT , C.COUNTRY , C.INDUSTRY_SECTOR FROM PS_PAY_CALENDAR A , PS_PAY_CHECK B , PS_PAYGROUP_TBL C , PS_PY_WC_PAYGRP D , PS_JOB E WHERE A.COMPANY = D.COMPANY AND A.PAYGROUP = D.PAYGROUP AND D.PY_INCL_PAYGRP = 'Y' AND A.PAY_END_DT = ( SELECT MAX(A1.PAY_END_DT) FROM PS_PAY_CALENDAR A1 WHERE A1.COMPANY = A.COMPANY AND A1.PAYGROUP = A.PAYGROUP AND (A1.PAY_PRECALC_RUN = 'Y' OR A1.PAY_CALC_RUN = 'Y') AND A1.PAY_CONFIRM_RUN = 'N') AND B.COMPANY = A.COMPANY AND B.PAYGROUP = A.PAYGROUP AND B.PAY_END_DT = A.PAY_END_DT AND B.TOTAL_GROSS > D.PY_THRESHOLD_AMT AND EXISTS ( SELECT 'X' FROM PS_PAY_EARNINGS F WHERE B.COMPANY=F.COMPANY AND B.PAYGROUP=F.PAYGROUP AND B.PAY_END_DT=F.PAY_END_DT AND B.OFF_CYCLE=F.OFF_CYCLE AND B.PAGE_NUM=F.PAGE_NUM AND B.LINE_NUM=F.LINE_NUM AND B.SEPCHK=F.SEPCHK AND F.PAY_LINE_STATUS IN ('C','V') ) AND B.EMPLID = E.EMPLID AND B.EMPL_RCD = E.EMPL_RCD AND E.EFFDT = ( SELECT MAX(E1.EFFDT) FROM PS_JOB E1 WHERE E1.EMPLID = E.EMPLID AND E1.EMPL_RCD = E.EMPL_RCD AND E1.EFFDT <= B.PAY_END_DT) AND E.EFFSEQ = ( SELECT MAX(E2.EFFSEQ) FROM PS_JOB E2 WHERE E2.EMPLID = E.EMPLID AND E2.EMPL_RCD = E.EMPL_RCD AND E2.EFFDT = E.EFFDT) AND E.EMPL_STATUS IN ( 'A' , 'P', 'Q', 'U') AND A.COMPANY = C.COMPANY AND A.PAYGROUP = C.PAYGROUP AND C.EFFDT = ( SELECT MAX(C1.EFFDT) FROM PS_PAYGROUP_TBL C1 WHERE C1.COMPANY = C.COMPANY AND C1.PAYGROUP = C.PAYGROUP AND C1.EFFDT <= A.PAY_END_DT) |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | COMPANY | Character(3) | VARCHAR2(3) NOT NULL | Company |
2 | PAYGROUP | Character(3) | VARCHAR2(3) NOT NULL | Pay Group |
3 | PAY_END_DT | Date(10) | DATE | Pay Period End Date |
4 | OFF_CYCLE | Character(1) | VARCHAR2(1) NOT NULL | Off Cycle ? |
5 | PAGE_NUM | Number(5,0) | INTEGER NOT NULL | Page Nbr |
6 | LINE_NUM | Number(3,0) | SMALLINT NOT NULL | Line Nbr |
7 | SEPCHK | Number(2,0) | SMALLINT NOT NULL | Separate check number. |
8 | EMPLID | Character(11) | VARCHAR2(11) NOT NULL | Employee ID |
9 | EMPL_RCD | Number(3,0) | SMALLINT NOT NULL | Empl Record |
10 | NAME | Character(50) | VARCHAR2(50) NOT NULL | Name |
11 | TOTAL_GROSS | Signed Number(12,2) | DECIMAL(10,2) NOT NULL | Total Gross |
12 | DEPTID | Character(10) | VARCHAR2(10) NOT NULL | Department |
13 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
14 | COUNTRY_CD | Character(3) | VARCHAR2(3) NOT NULL | Country Code |
15 | INDUSTRY_SECTOR | Character(4) | VARCHAR2(4) NOT NULL |
Industry Sector
CORE=Core PBSC=Public Sector USFG=US Federal Government |