HR_EEO1_EPAY_VW

(SQL View)
Index Back

W-2 Amounts View

This view selects tax data for on-line display of employee W-2 information.

SELECT COMPANY ,CALENDAR_YEAR , EMPLID ,SUM(W2_AMOUNT) FROM PS_YE_AMOUNTS WHERE TAXFORM_ID IN ('I' ,'M','P','S','U','W') AND BOX = '01' AND EMPLID NOT IN ( SELECT DISTINCT B.W2C_ADD_EMPLID FROM PS_YE_W2C_AMOUNTS B WHERE B.BOX = '01' AND B.CALENDAR_YEAR = PS_YE_AMOUNTS.CALENDAR_YEAR AND W2C_BATCH_NBR = ( SELECT MAX(A.W2C_BATCH_NBR) FROM PS_YE_W2C_AMOUNTS A WHERE A.W2C_ADD_EMPLID = B.W2C_ADD_EMPLID AND A.BOX= B.BOX AND A.CALENDAR_YEAR= B.CALENDAR_YEAR)) GROUP BY COMPANY ,CALENDAR_YEAR , EMPLID UNION SELECT B.COMPANY ,B.CALENDAR_YEAR , B.W2C_ADD_EMPLID ,SUM(B.CURRENT_AMOUNT) FROM PS_YE_W2C_AMOUNTS B WHERE B.BOX = '01' AND W2C_BATCH_NBR = ( SELECT MAX(A.W2C_BATCH_NBR) FROM PS_YE_W2C_AMOUNTS A WHERE A.W2C_ADD_EMPLID = B.W2C_ADD_EMPLID AND A.BOX= B.BOX AND A.CALENDAR_YEAR= B.CALENDAR_YEAR) GROUP BY B.COMPANY ,B.CALENDAR_YEAR , B.W2C_ADD_EMPLID

# 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 W2_AMOUNT Signed Number(15,2) DECIMAL(13,2) NOT NULL W-2 Amount