CM_PERRAVG_1_VW(SQL View) |
Index Back |
---|---|
Avg Cost Adj Totals ViewUsed for summing temp table CM_PERPAVG_TMP which holds the original, POVO, VO, and previous delta costs. |
SELECT BUSINESS_UNIT , CM_BOOK , INV_ITEM_ID , DT_TIMESTAMP , SEQ_NBR , COST_ELEMENT , CM_SEQ_COST , SUM(CM_UNIT_COST_POVO) , SUM(CM_UNIT_COST_VO) FROM PS_CM_RETRAVG_TMP WHERE EXISTS ( SELECT 'X' FROM PS_CM_PERRADJ_COST WHERE PS_CM_PERRADJ_COST.BUSINESS_UNIT = PS_CM_RETRAVG_TMP.BUSINESS_UNIT AND PS_CM_PERRADJ_COST.CM_BOOK = PS_CM_RETRAVG_TMP.CM_BOOK AND PS_CM_PERRADJ_COST.INV_ITEM_ID = PS_CM_RETRAVG_TMP.INV_ITEM_ID AND PS_CM_PERRADJ_COST.DT_TIMESTAMP = PS_CM_RETRAVG_TMP.DT_TIMESTAMP AND PS_CM_PERRADJ_COST.SEQ_NBR = PS_CM_RETRAVG_TMP.SEQ_NBR AND PS_CM_PERRADJ_COST.POSTED_FLAG IN ('N','A') ) GROUP BY BUSINESS_UNIT , CM_BOOK, INV_ITEM_ID , DT_TIMESTAMP , SEQ_NBR , COST_ELEMENT , CM_SEQ_COST |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
2 | CM_BOOK | Character(10) | VARCHAR2(10) NOT NULL | Cost Book |
3 | INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Item ID |
4 | DT_TIMESTAMP | DateTime(26) | TIMESTAMP | Date Timestamp |
5 | SEQ_NBR | Number(15,0) | DECIMAL(15) NOT NULL | Sequence Number |
6 | COST_ELEMENT | Character(4) | VARCHAR2(4) NOT NULL | Cost Element |
7 | CM_SEQ_COST | Number(15,0) | DECIMAL(15) NOT NULL | Cost Sequence Number. Incremented each time the actual cost is updated. |
8 | CM_UNIT_COST_POVO | Signed Number(32,15) | DECIMAL(30,15) NOT NULL | 07/99 GMG CN800-9.0: |
9 | CM_UNIT_COST_VO | Signed Number(32,15) | DECIMAL(30,15) NOT NULL | 07/99 GMG CN800-9.0: |