TRX_ACCINT_MM_V

(SQL View)
Index Back

Monthly interest accruals view

Used in online interest accruals panel. Data is select from this view and into TRX_ACC_INT_TMP, which is a work table for the panel grid.

SELECT B.TRX_YEAR_NUM , B.TRX_MONTH_NUM , MIN(B.CALENDAR_DATE) , MAX(B.CALENDAR_DATE) , A.POSITION_CURRENCY , SUM(%Round(((%DecDiv(%DecMult(PERIOD_INT_ACCRUAL,(%DateDiff(PD_INT_START_DT, CALENDAR_DATE) + 1)),%DateDiff(PD_INT_START_DT, PERIOD_END_DT) ) - %DecDiv(%DecMult(PERIOD_INT_ACCRUAL, %DateDiff(PD_INT_START_DT, CALENDAR_DATE) ), %DateDiff( PD_INT_START_DT, PERIOD_END_DT)))),3)) , SUM(%Round(((%DecDiv(%DecMult(DISCOUNT_AMT,(%DateDiff(PD_INT_START_DT, CALENDAR_DATE) + 1)), %DateDiff(PD_INT_START_DT, PERIOD_END_DT) ) - %DecDiv(%DecMult(DISCOUNT_AMT, %DateDiff(PD_INT_START_DT, CALENDAR_DATE) ), %DateDiff( PD_INT_START_DT, PERIOD_END_DT)))),3)) ,A.BUSINESS_UNIT ,A.TR_SOURCE_ID FROM PS_TRX_POSITION_TR A , PS_POS_DAYS_TBL B WHERE A.TR_SOURCE_CD='D' AND B.CALENDAR_DATE >= A.PERIOD_START_DT AND B.CALENDAR_DATE < A.PERIOD_END_DT GROUP BY B.TRX_YEAR_NUM, B.TRX_MONTH_NUM, A.POSITION_CURRENCY, A.BUSINESS_UNIT, A.TR_SOURCE_ID

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 TRX_YEAR_NUM Number(4,0) SMALLINT NOT NULL Year in numeric form
2 TRX_PERIOD_NUM Number(3,0) SMALLINT NOT NULL Period
3 FROM_DATE Date(10) DATE From Date
4 TO_DATE Date(10) DATE To Date
5 POSITION_CURRENCY Character(3) VARCHAR2(3) NOT NULL The transaction currency of a given position or exposure.
6 ACCRUED_INT Signed Number(28,3) DECIMAL(26,3) NOT NULL The periodic amount of accrued interest for a given deal transaction.
7 BOND_DISC_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Discount Amount for Straightline Bond
8 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
9 TR_SOURCE_ID Character(12) VARCHAR2(12) NOT NULL An internal work field that represents a unique identifier for records depicting a given treasury po