RA_CUST_COUNT

(SQL View)
Index Back

No. of Customers for a Wave

Used in another View RA_WHATIFQRY_VW for BAM analysis report. List of Order Statuses as of 10/09/02 ..sent by Jon Ruggiero ------------------------------------------------------------------------------------------------ 1 Cancelled 500 Pending 1000 Open 2000 In Process 6000 Complete 8500 Fulfillment Hold 9000 Hold

SELECT CASE WHEN A.RA_PROMOTION_CODE = ' ' THEN B.RA_PROMOTION_CODE WHEN A.RA_PROMOTION_CODE <> ' ' THEN A.RA_PROMOTION_CODE END ,A.CURRENCY_CD ,A.CUR_RT_TYPE , COUNT(DISTINCT B.CAPTURE_ID) , %Round(SUM(%DecMult(B.QTY_ORDERED,B.PRICE)),3) FROM PS_RO_HEADER A , PS_RO_LINE B WHERE A.CAPTURE_ID = B.CAPTURE_ID AND (A.RA_PROMOTION_CODE <> ' ' OR B.RA_PROMOTION_CODE <> ' ') AND A.CAPTURE_TYPE_CD = 'SO' AND A.STATUS_CODE <> 1 GROUP BY A.RA_PROMOTION_CODE,B.RA_PROMOTION_CODE,A.CURRENCY_CD,A.CUR_RT_TYPE

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 RA_PROMOTION_CODE Character(35) VARCHAR2(35) NOT NULL Marketing - campaign wave promotion code
2 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL This field stores the Currency Code value.
3 CUR_RT_TYPE Character(5) VARCHAR2(5) NOT NULL Currency Rate Type
4 NO_OF_CUSTOMERS Number(10,0) DECIMAL(10) NOT NULL No. of Customers
5 REV_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Reveune Amount