TD_ALL_PROS_VW1(SQL View) |
Index Back |
---|---|
All Promos/Alws by Customer |
SELECT DISTINCT A.SETID , B.CUST_ID , A.PPRC_PROMO_CD , A.DESCR FROM PS_PPRC_PROMO_TBL A , PS_CUSTOMER B , PS_SET_CNTRL_REC C WHERE A.EFF_STATUS = 'A' AND B.SETID = C.SETID AND C.RECNAME = 'CUSTOMER' AND C.SETCNTRLVALUE = A.SETID AND ((EXISTS( SELECT 'X' FROM PS_TD_PROMO_CUST D WHERE A.SETID = D.SETID AND A.PPRC_PROMO_CD = D.PPRC_PROMO_CD AND B.CUST_ID = D.CUST_ID AND D.status_td = 'CA')) OR (EXISTS( SELECT 'X' FROM PS_TD_ALLOW_CUST E WHERE A.SETID = E.SETID AND A.PPRC_PROMO_CD = E.PPRC_PROMO_CD AND B.CUST_ID = E.CUST_ID AND E.CUST_ID <> ' ' ) AND A.PROMO_TYPE = 'A' AND A.ALLOW_STATUS = '4' )) |
# | 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 | PPRC_PROMO_CD | Character(20) | VARCHAR2(20) NOT NULL | Price Promotion Code |
4 | DESCR | Character(30) | VARCHAR2(30) NOT NULL | Description |