CM_ACTCUR_VW(SQL View) |
Index Back |
---|---|
Latest Actual Costs10/10/02 lee: This view captures the latest records, for a business unit/item, from cm_actual_costs. |
SELECT A.BUSINESS_UNIT , A.INV_ITEM_ID , A.DT_TIMESTAMP , A.SEQ_NBR , A.COST_ELEMENT , A.CM_SEQ_COST , A.CM_UNIT_COST FROM PS_CM_ACTUAL_COST A WHERE A.DT_TIMESTAMP = ( SELECT MAX(B.DT_TIMESTAMP) FROM PS_CM_ACTUAL_COST B WHERE B.BUSINESS_UNIT = A.BUSINESS_UNIT AND B.INV_ITEM_ID = A.INV_ITEM_ID AND B.EFF_STATUS ='A' ) AND A.SEQ_NBR = ( SELECT MAX(C.SEQ_NBR) FROM PS_CM_ACTUAL_COST C WHERE C.BUSINESS_UNIT = A.BUSINESS_UNIT AND C.INV_ITEM_ID = A.INV_ITEM_ID AND C.DT_TIMESTAMP = A.DT_TIMESTAMP AND C.EFF_STATUS = 'A') AND A.EFF_STATUS = 'A' |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
2 | INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Item ID |
3 | DT_TIMESTAMP | DateTime(26) | TIMESTAMP | Date Timestamp |
4 | SEQ_NBR | Number(15,0) | DECIMAL(15) NOT NULL | Sequence Number |
5 | COST_ELEMENT | Character(4) | VARCHAR2(4) NOT NULL | Cost Element |
6 | CM_SEQ_COST | Number(15,0) | DECIMAL(15) NOT NULL | Cost Sequence Number. Incremented each time the actual cost is updated. |
7 | CM_UNIT_COST | Signed Number(27,15) | DECIMAL(25,15) NOT NULL | 07/99 GMG CN800-9.0: |