GPSG_WORK_DAYS

(SQL View)
Index Back

Count Work Days

Count the workdays for a Work Schedule

SELECT J.EMPL_RCD , J.EFFDT , A.THE_DATE , B.THE_DATE , J.EMPLID , COUNT(*) FROM PS_SCH_ASSIGN J ,PS_TL_DATES_TBL A ,PS_TL_DATES_TBL B ,PS_TL_DATES_TBL C ,PS_SCH_DEFN_DTL D WHERE J.SCHEDULE_ID = D.SCHEDULE_ID AND J.SETID = D.SETID AND J.SCH_ADHOC_IND = D.SCH_ADHOC_IND AND D.OFFDAY_IND = 'N' AND B.THE_DATE >= A.THE_DATE AND C.THE_DATE BETWEEN A.THE_DATE AND B.THE_DATE GROUP BY J.EMPLID, J.EMPL_RCD, J.EFFDT, A.THE_DATE, B.THE_DATE

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPL_RCD Number(3,0) SMALLINT NOT NULL Empl Rcd Nbr
2 EFFDT Date(10) DATE Effective Date

Default Value: %date

3 DATE_FROM Date(10) DATE Date From
4 DATE_TO Date(10) DATE Previous Period Date To
5 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
6 NUM_DAYS Number(3,0) SMALLINT NOT NULL Number of Days