BI_LN_ST_EC_VW

(SQL View)
Index Back

BI LINE SHIP TO Addr View


SELECT HDR.BUSINESS_UNIT , HDR.INVOICE , LN.LINE_SEQ_NUM , A.NAME1 , A.NAME2 , A.NAME3 , A.NAMESHORT ,%SUBREC(ADDRESS_SBR,B) , B.PHONE , B.EXTENSION , B.FAX , B.ALT_NAME1 , B.ALT_NAME2 FROM PS_CUSTOMER A , PS_CUST_ADDRESS B , PS_BI_HDR HDR , PS_BI_LINE LN , PS_SET_CNTRL_REC S WHERE HDR.CONSOL_HDR = 'N' AND A.SETID = B.SETID AND A.CUST_ID= B.CUST_ID AND HDR.BUSINESS_UNIT = LN.BUSINESS_UNIT AND HDR.INVOICE = LN.INVOICE AND HDR.SHIP_TO_CUST_ID <> LN.SHIP_TO_CUST_ID AND LN.SHIP_TO_CUST_ID = B.CUST_ID AND LN.SHIP_TO_ADDR_NUM = B.ADDRESS_SEQ_NUM AND B.SETID = S.SETID AND S.SETCNTRLVALUE = HDR.BUSINESS_UNIT AND S.RECNAME = 'CUST_ADDRESS' AND B.EFFDT = (SELECT MAX(EFFDT) FROM PS_CUST_ADDRESS WHERE SETID = B.SETID AND CUST_ID = B.CUST_ID AND ADDRESS_SEQ_NUM = B.ADDRESS_SEQ_NUM AND ((EFFDT <= %currentdatein and HDR.INVOICE_DT IS NULL) or (EFFDT <= HDR.INVOICE_DT and HDR.INVOICE_DT IS NOT NULL))) AND B.EFF_STATUS='A'

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 INVOICE Character(22) VARCHAR2(22) NOT NULL Invoice
3 LINE_SEQ_NUM Number(5,0) INTEGER NOT NULL Sequence
4 NAME1 Character(40) VARCHAR2(40) NOT NULL Name 1
5 NAME2 Character(40) VARCHAR2(40) NOT NULL Name 2
6 NAME3 Character(40) VARCHAR2(40) NOT NULL Name 3
7 NAMESHORT Character(10) VARCHAR2(10) NOT NULL Short Name
8 COUNTRY Character(3) VARCHAR2(3) NOT NULL Country

Prompt Table: COUNTRY_TBL

9 ADDRESS1 Character(55) VARCHAR2(55) NOT NULL Address 1
10 ADDRESS2 Character(55) VARCHAR2(55) NOT NULL Address 2
11 ADDRESS3 Character(55) VARCHAR2(55) NOT NULL Address 3
12 ADDRESS4 Character(55) VARCHAR2(55) NOT NULL Address 4
13 CITY Character(30) VARCHAR2(30) NOT NULL City
14 NUM1 Character(6) VARCHAR2(6) NOT NULL Number 1
15 NUM2 Character(6) VARCHAR2(6) NOT NULL Number 2
16 HOUSE_TYPE Character(2) VARCHAR2(2) NOT NULL House Type
AB=House Boat
WW=Trailer
17 ADDR_FIELD1 Character(2) VARCHAR2(2) NOT NULL Address Field 1
18 ADDR_FIELD2 Character(4) VARCHAR2(4) NOT NULL Address Field 2
19 ADDR_FIELD3 Character(4) VARCHAR2(4) NOT NULL Address Field 3
20 COUNTY Character(30) VARCHAR2(30) NOT NULL County
21 STATE Character(6) VARCHAR2(6) NOT NULL State

Prompt Table: %EDIT_STATE

22 POSTAL Character(12) VARCHAR2(12) NOT NULL Postal
23 GEO_CODE Character(11) VARCHAR2(11) NOT NULL Geo Code
24 IN_CITY_LIMIT Character(1) VARCHAR2(1) NOT NULL In City Limit

Y/N Table Edit

25 PHONE Character(24) VARCHAR2(24) NOT NULL Telephone
26 EXTENSION Character(6) VARCHAR2(6) NOT NULL Phone Extension
27 FAX Character(24) VARCHAR2(24) NOT NULL Fax Number
28 ALT_NAME1 Character(40) VARCHAR2(40) NOT NULL Alternate Name 1
29 ALT_NAME2 Character(40) VARCHAR2(40) NOT NULL Alternate Name 2