AR_CUST_CRHD_VW

(SQL View)
Index Back

Customer that w/ Credit HOLD

The view that created to filter out the credit hold customers.

SELECT DISTINCT A.SETID , A.CUST_ID FROM PS_CUST_MSG A , PS_MESSAGE_TBL B , PS_HOLD_CD D , PS_SET_CNTRL_REC C WHERE C.RECNAME='MESSAGE_TBL' AND C.SETCNTRLVALUE = A.SETID AND B.SETID = C.SETID AND A.MESSAGE_CD = B.MESSAGE_CD AND B.MESSAGE_CD_TYPE = '01' AND B.HOLD_CD = D.HOLD_CD AND B.SETID = D.SETID AND B.EFFDT = ( SELECT MAX(BE.EFFDT) FROM PS_MESSAGE_TBL BE WHERE BE.SETID = B.SETID AND BE.MESSAGE_CD = B.MESSAGE_CD AND BE.EFFDT <= %CurrentDateIn) AND %CurrentDateIn >= A.START_DT AND %CurrentDateIn <= A.END_DT AND D.EFFDT = ( SELECT MAX(DE.EFFDT) FROM PS_HOLD_CD DE WHERE DE.SETID = D.SETID AND DE.HOLD_CD = D.HOLD_CD AND DE.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.