COST_BALCAT2_VW

(SQL View)
Index Back

Cloned from COST_BAL_VW

Used in AMPS1000.

SELECT BUSINESS_UNIT , ASSET_ID , BOOK , CATEGORY , SUM(QUANTITY) , SUM(COST) , FROM_CUR FROM PS_COST_BAL_VW9 WHERE NOT EXISTS (SELECT 'X' FROM PS_ASSET_ACQ_DET WHERE PS_ASSET_ACQ_DET.BUSINESS_UNIT = PS_COST_BAL_VW9.BUSINESS_UNIT AND PS_ASSET_ACQ_DET.ASSET_ID=PS_COST_BAL_VW9.ASSET_ID) GROUP BY BUSINESS_UNIT , ASSET_ID , BOOK , CATEGORY , FROM_CUR UNION SELECT A.BUSINESS_UNIT , A.ASSET_ID , A.BOOK , B.CATEGORY , SUM(A.QUANTITY) , SUM(A.COST) , A.FROM_CUR FROM PS_COST_BAL_VW9 A , ( SELECT DISTINCT C.BUSINESS_UNIT ,C.ASSET_ID ,C.CATEGORY FROM PS_ASSET_ACQ_DET C) B WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.ASSET_ID=B.ASSET_ID GROUP BY A.BUSINESS_UNIT , A.ASSET_ID , A.BOOK , B.CATEGORY , A.FROM_CUR

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 ASSET_ID Character(12) VARCHAR2(12) NOT NULL Asset Identification
3 BOOK Character(10) VARCHAR2(10) NOT NULL Asset Book Name
4 CATEGORY Character(5) VARCHAR2(5) NOT NULL Asset Category
5 QUANTITY Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Interface
6 COST Signed Number(28,3) DECIMAL(26,3) NOT NULL Total Cost
7 FROM_CUR Character(3) VARCHAR2(3) NOT NULL From Currency Code