CUST_AGE_SI_VW(SQL View) |
Index Back |
---|---|
Customer Aging by Setid |
SELECT R.SETID , A.CUST_ID , A.AGING_ID , A.AGING_CATEGORY , A.BUSINESS_UNIT , A.AGING_AMT , A.AGING_CNT , A.CURRENCY_CD FROM PS_CUST_AGING A , PS_BUS_UNIT_OPT_AR C , PS_CUSTOMER R , PS_CUST_OPTION O WHERE C.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC WHERE RECNAME = 'BUS_UNIT_OPT_AR' AND SETCNTRLVALUE = A.BUSINESS_UNIT) AND((C.AGING_ID = A.AGING_ID AND O.AGING_ID = ' ') OR O.AGING_ID = A.AGING_ID) AND R.CUST_ID = A.CUST_ID AND R.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC WHERE RECNAME = 'CUSTOMER' AND SETCNTRLVALUE = A.BUSINESS_UNIT) AND R.CUST_ID = O.CUST_ID AND O.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC WHERE RECNAME = 'CUST_OPTION' AND SETCNTRLVALUE = A.BUSINESS_UNIT) AND O.EFFDT = ( SELECT MAX(EFFDT) FROM PS_CUST_OPTION P WHERE O.SETID = P.SETID AND O.CUST_ID = P.CUST_ID AND P.EFF_STATUS = 'A' AND P.EFFDT <= %CurrentDateIn) |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | SETID | Character(5) | VARCHAR2(5) NOT NULL | SetID |
2 | CUST_ID | Character(15) | VARCHAR2(15) NOT NULL | Uniquely identifies an organizational entity that purchases goods or services from the enterprise. Represents the sold-to customer which is the customer organization that places orders. The CUST_ID may or may not be the same as the identifiers for the bill-to and ship-to locations. |
3 | AGING_ID | Character(5) | VARCHAR2(5) NOT NULL | Aging ID |
4 | AGING_CATEGORY | Character(2) | VARCHAR2(2) NOT NULL | Aging Category |
5 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
6 | AGING_AMT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Aging Amount |
7 | AGING_CNT | Number(6,0) | INTEGER NOT NULL | Aging Count |
8 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |