CUST_PTSF_SHPVW(SQL View) |
Index Back |
---|---|
Valid Ship To for Sold To - OMIn the SQL text, don't worry about CUST_SHIPTO and timestamps. Updates to that record will update the timestamp on CUSTOMER. |
SELECT A.SETID ,A.CUST_ID ,A.SHIP_TO_CUST_ID ,C.ADDRESS_SEQ_NUM ,B.NAME1 ,C.PHONE ,C.CITY ,C.STATE ,C.POSTAL ,CASE WHEN A.DATE_LAST_MAINT > %DatePart(B.LASTUPDDTTM) THEN %Dttm(A.DATE_LAST_MAINT, %CurrentTimeIn) WHEN B.LASTUPDDTTM > C.LASTUPDDTTM THEN B.LASTUPDDTTM ELSE C.LASTUPDDTTM END FROM PS_CUST_SHIPTO A , PS_CUSTOMER B , PS_CUST_ADDRESS C WHERE A.SETID = B.SETID AND A.SHIP_TO_CUST_ID = B.CUST_ID AND B.SETID = C.SETID AND B.CUST_ID = C.CUST_ID AND B.CUST_STATUS = 'A' AND B.EXP_PENDING = 'N' AND %EffdtCheck(cust_address,C,%currentdatein) AND C.eff_status='A' |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | SETID | Character(5) | VARCHAR2(5) NOT NULL | SetID |
2 | SOLD_TO_CUST_ID | Character(15) | VARCHAR2(15) NOT NULL | Sold To Customer |
3 | SHIP_TO_CUST_ID | Character(15) | VARCHAR2(15) NOT NULL | Ship To Customer |
4 | ADDRESS_SEQ_SHIP | Number(5,0) | INTEGER NOT NULL | Primary Address - Ship To |
5 | NAME1 | Character(40) | VARCHAR2(40) NOT NULL | Name 1 |
6 | PHONE | Character(24) | VARCHAR2(24) NOT NULL | Telephone |
7 | CITY | Character(30) | VARCHAR2(30) NOT NULL | City |
8 | STATE | Character(6) | VARCHAR2(6) NOT NULL | State |
9 | POSTAL | Character(12) | VARCHAR2(12) NOT NULL | Postal |
10 | LASTUPDDTTM | DateTime(26) | TIMESTAMP | Specifies the date and time of the last update to an entry. This field is maintained by PeopleSoft and is used in a variety of contexts. |