TL_PT_APP_VW

(SQL View)
Index Back

Aprover Name for payable time

View used in pivot grids to show the latest approver for a given payable time row

SELECT X.EMPLID , X.EMPL_RCD , X.DUR , X.SEQ_NBR , U.OPRID , ( SELECT N.NAME FROM PSOPRDEFN O , PS_NAMES N WHERE O.OPRID = U.OPRID AND N.EMPLID = O.EMPLID AND N.NAME_TYPE = 'PRI' AND N.effdt = ( SELECT MAX(N1.effdt) FROM PS_NAMES N1 WHERE N1.EMPLID = N.EMPLID AND N1.NAME_TYPE = N.NAME_TYPE AND N1.effdt <= %CurrentDateIn)) FROM PS_TL_APP_PAY_XRF X , PS_EOAW_STEPINST S , PS_EOAW_USERINST U WHERE X.EOAWTHREAD_ID = S.EOAWTHREAD_ID AND X.EOAWPRCS_ID = S.EOAWPRCS_ID AND S.EOAWSTEP_INSTANCE = U.EOAWSTEP_INSTANCE AND X.TRANSACTIONID = ( SELECT MAX(TRANSACTIONID) FROM PS_TL_APP_PAY_XRF SUB WHERE SUB.EMPLID=X.EMPLID AND SUB.EMPL_RCD=X.EMPL_RCD AND SUB.DUR=X.DUR AND SUB.SEQ_NBR=X.SEQ_NBR) AND X.EOAWTHREAD_ID = ( SELECT MAX(EOAWTHREAD_ID) FROM PS_TL_APP_PAY_XRF SUB WHERE SUB.EMPLID=X.EMPLID AND SUB.EMPL_RCD=X.EMPL_RCD AND SUB.DUR=X.DUR AND SUB.SEQ_NBR=X.SEQ_NBR AND SUB.TRANSACTIONID = X.TRANSACTIONID)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
2 EMPL_RCD Number(3,0) SMALLINT NOT NULL Empl Record
3 DUR Date(10) DATE Date Under Report associates time being reported, scheduled or paid, to a specific date.
4 SEQ_NBR Number(15,0) DECIMAL(15) NOT NULL Sequence Number
5 ORIGINATORID Character(30) VARCHAR2(30) NOT NULL Originator Identifier
6 APPROVER_NAME Character(50) VARCHAR2(50) NOT NULL Approver Name