CUST_M_CORPT_VW

(SQL View)
Index Back

Customer Messages - Corp Tree


SELECT %Substring(t.setid,1,5) , t.tree_node , c.cust_id , c.seq_num , c.message_cd , c.start_dt , c.end_dt FROM PSTREENODE t , ps_cust_msg c , pstreeleaf l WHERE c.setid = t.setid AND c.cust_id BETWEEN l.range_from AND l.range_to AND t.tree_name = 'AR_CORPORATE_CUST' AND t.effdt = ( SELECT MAX(effdt) FROM PSTREENODE WHERE setid = t.setid AND tree_name=t.tree_name AND effdt <= %CurrentDateIn) AND t.tree_node_num > 1 AND l.setid = t.setid AND l.tree_name = t.tree_name AND l.effdt = t.effdt AND l.tree_node_num BETWEEN t.tree_node_num AND t.tree_node_num_end

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID

Default Value: OPR_DEF_TBL_FS.SETID

Prompt Table: SP_SETID_NONVW

2 TREE_NODE Character(20) VARCHAR2(20) NOT NULL Node name
3 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.

Prompt Table: CUSTOMER

4 SEQ_NUM Number(3,0) SMALLINT NOT NULL Sequence

Default Value: 1

5 MESSAGE_CD Character(6) VARCHAR2(6) NOT NULL Message Code

Prompt Table: MESSAGE_TBL

6 START_DT Date(10) DATE Start Date
7 END_DT Date(10) DATE End Date