DEPT_SAL_CUR_VW

(SQL View)
Index Back

Dept Budget Current Totals

DEPT_SALRY_CURR is a view which retrieves total salaries, headcount, and FTE by department as of the current date.

SELECT A.SETID_DEPT ,A.DEPTID ,O.OPRCLASS ,%Truncate(SUM(%Sql(FUNCLIB_HR_CURRENC_RESULT,A.ANNUAL_RT,CONV)),2) ,COUNT(*) ,SUM(A.FTE) FROM PS_JOB A ,PS_OPR_DEF_TBL_HR O %Sql(FUNCLIB_HR_CURRENC_FROM) CONV WHERE A.PER_ORG = 'EMP' AND A.EFFDT = ( SELECT MAX(C.EFFDT) FROM PS_JOB C WHERE C.EMPLID = A.EMPLID AND C.EMPL_RCD = A.EMPL_RCD AND C.EFFDT <= %CurrentDateIn) AND A.EFFSEQ = ( SELECT MAX(D.EFFSEQ) FROM PS_JOB D WHERE D.EMPLID = A.EMPLID AND D.EMPL_RCD = A.EMPL_RCD AND D.EFFDT = A.EFFDT) AND A.HR_STATUS = 'A' AND A.POSITION_NBR <> ' ' AND %Sql(FUNCLIB_HR_CURRENC_WHERE,A.CURRENCY_CD,O.EXCHNG_TO_CURRENCY,O.EXCHNG_TO_RT_TYPE,%CurrentDateIn,CONV) AND O.OPRCLASS = %OperatorClass GROUP BY A.SETID_DEPT, A.DEPTID, O.OPRCLASS

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID
2 DEPTID Character(10) VARCHAR2(10) NOT NULL Department

Prompt Table: DEPT_TBL

3 OPRCLASS Character(30) VARCHAR2(30) NOT NULL Operator Class
4 TOTAL_SALARIES Signed Number(20,3) DECIMAL(18,3) NOT NULL Total Annual Salaries
5 TOTAL_COUNT Number(7,0) INTEGER NOT NULL Total Count
6 TOTAL_FTE_UNROUND Number(16,11) DECIMAL(15,11) NOT NULL Total Unrounded FTE