CUST_SHIPTO

(SQL View)
Index Back

Valid Ship To Relationships

This table stores the relationships of Customer ID to Ship-To Customer ID.

SELECT B.SETID , B.CUST_ID , C.CUST_ID , CASE WHEN 0 < ( SELECT COUNT(*) FROM PS_BO_REL D WHERE D.REL_TYPE_ID IN (49,51,61,63) AND B.BO_ID = D.BO_ID_1 AND D.ROLE_TYPE_ID_1 IN (42,46) AND C.BO_ID = D.BO_ID_2 AND D.ROLE_TYPE_ID_2 IN (41,45) AND D.START_DT <= %CurrentDateIn AND D.END_DT > %CurrentDateIn ) THEN 1 ELSE 0 END , A.ROW_LASTMANT_OPRID , %CurrentDateIn FROM PS_BO_REL A, PS_BC B , PS_BC C WHERE A.BO_ID_1 =B.BO_ID AND A.BO_ID_2 = C. BO_ID AND (A.REL_TYPE_ID IN(49,51,61,63) OR A.REL_TYPE_ID IN (48,50,60,62) ) AND A.ROLE_TYPE_ID_1 IN (42,46) AND A.ROLE_TYPE_ID_2 IN (41,45) AND A.START_DT <= %CurrentDateIn AND A.END_DT > %CurrentDateIn

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL This field is used to store the value of SetID on various setup tables.

Prompt Table: SP_SETID_NONVW

2 CUST_ID Character(15) VARCHAR2(15) NOT NULL Customer ID
3 SHIP_TO_CUST_ID Character(15) VARCHAR2(15) NOT NULL Ship To Customer
4 SLDTO_PRIORITY_NBR Number(4,0) SMALLINT NOT NULL Sldto Priority Nbr

Default Value: 1

5 LAST_MAINT_OPRID Character(30) VARCHAR2(30) NOT NULL This field determines the last user or operator that last changed this item.
6 DATE_LAST_MAINT Date(10) DATE This field determines the date of last maintenance.