TR_WKS_SUM_VW

(SQL View)
Index Back

View Postion Amounts by Date


SELECT C.OPRID , A.VALUE_DT , A.POSITION_CURRENCY , SUM(A.POS_IMPCT_ORIG) , CASE WHEN SUM(POS_IMPCT_ORIG) < 0 THEN 10 ELSE 1 END , ' ' , ' ' FROM PS_CSH_FCST_SUM A , PS_TR_CASH_POS_CFG C WHERE A.SETID = C.SETID AND A.WORKSHEET_ID = C.WORKSHEET_ID AND A.SOURCE_SET = C.SOURCE_SET AND A.GROUP_BY_FIELD = 'WKS' AND A.POSITION_CURRENCY = C.POSITION_CURRENCY AND A.LINE_ITEM_TYPE='1' AND A.POS_HIST_FLAG ='N' AND A.CALC_DT IN ( SELECT MAX(B.CALC_DT) FROM PS_CSH_FCST_SUM B WHERE B.SETID = A.SETID AND B.WORKSHEET_ID = A.WORKSHEET_ID AND B.SOURCE_SET = A.SOURCE_SET AND B.GROUP_BY_FIELD = A.GROUP_BY_FIELD AND B.WRKSHEET_LINE_ITEM = A.WRKSHEET_LINE_ITEM AND B.VALUE_DT = A.VALUE_DT AND B.POSITION_CURRENCY = A.POSITION_CURRENCY AND B.GROUP_BY_FIELD = 'WKS' AND B.LINE_ITEM_TYPE='1' AND B.POS_HIST_FLAG ='N' ) GROUP BY C.OPRID , A.VALUE_DT, A.POSITION_CURRENCY

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).
2 VALUE_DT Date(10) DATE Equivalent to a deal transaction's settlement date.
3 POSITION_CURRENCY Character(3) VARCHAR2(3) NOT NULL The transaction currency of a given position or exposure.
4 POS_IMPCT_ORIG Signed Number(28,3) DECIMAL(26,3) NOT NULL Represents the calculated monetary value for a specific position tree node; the result
5 TR_CHART_COLOR Number(3,0) SMALLINT NOT NULL Chart Color
6 DESCR100 Character(100) VARCHAR2(100) NOT NULL Length 100 Description
7 DESCR Character(30) VARCHAR2(30) NOT NULL Description