YE_COMBINED_VW(SQL View) |
Index Back |
---|---|
W-2 Amounts ViewThis view selects tax data for on-line display of employee W-2 information. |
SELECT B.W2_REPORTING_CO ,A.CALENDAR_YEAR ,A.EMPLID ,A.TAXFORM_ID ,A.SEQUENCE_NUMBER ,A.BOX ,A.STATE ,A.LOCALITY ,C.DESCR ,SUM(A.W2_AMOUNT) FROM PS_YE_AMOUNTS A ,PS_W2_COMPANY B ,PS_TAXFORM_BOX C WHERE A.COMPANY = B.COMPANY AND A.CALENDAR_YEAR = B.CALENDAR_YEAR AND A.CALENDAR_YEAR = TO_NUMBER(TO_CHAR(C.EFFDT,'YYYY')) AND A.TAXFORM_ID = C.TAXFORM_ID AND A.BOX = C.BOX AND C.EFFDT = ( SELECT MAX(C1.EFFDT) FROM PS_TAXFORM_BOX C1 WHERE C1.TAXFORM_ID = C.TAXFORM_ID AND TO_NUMBER(TO_CHAR(C1.EFFDT,'YYYY'))= A.CALENDAR_YEAR) GROUP BY B.W2_REPORTING_CO ,A.CALENDAR_YEAR ,A.EMPLID ,A.TAXFORM_ID ,A.SEQUENCE_NUMBER ,A.BOX ,A.STATE ,A.LOCALITY,C.DESCR |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | COMPANY | Character(3) | VARCHAR2(3) NOT NULL | Company |
2 | CALENDAR_YEAR | Number(4,0) | SMALLINT NOT NULL | Calendar Year |
3 | EMPLID | Character(11) | VARCHAR2(11) NOT NULL | Employee ID |
4 | TAXFORM_ID | Character(1) | VARCHAR2(1) NOT NULL |
Tax Form Identification
A=T4A Slip B=Business Payrolls Survey - CAN C=WCB Assessable Earnings E=Record of Employment F=940 - Annual Employer's FUTA I=W-2VI J=W-2cVI M=W-2GU N=W-2cGU P=W-2PR Q=W-2cPR R=RL-1 Slip S=W-2AS T=T4 Slip U=W-2cAS V=RL-2 Slip W=W-2 X=W-2c Y=1099-R Z=1042-S |
5 | SEQUENCE_NUMBER | Number(2,0) | SMALLINT NOT NULL | Sequence Number |
6 | BOX | Character(4) | VARCHAR2(4) NOT NULL | Box |
7 | STATE | Character(6) | VARCHAR2(6) NOT NULL | State |
8 | LOCALITY | Character(10) | VARCHAR2(10) NOT NULL | Locality |
9 | DESCR | Character(30) | VARCHAR2(30) NOT NULL | Description |
10 | W2_AMOUNT | Signed Number(15,2) | DECIMAL(13,2) NOT NULL | W-2 Amount |