RE_JOB_LOC_DTL

(SQL View)
Index Back

Location Code Details

Resolving a pair of Business Unit Location Code to address1...4, city, state, zip, country.

SELECT A.BUSINESS_UNIT , A.LOCATION , C.ADDRESS1 , C.ADDRESS2 , C.ADDRESS3 , C.ADDRESS4 , C.CITY , C.STATE , C.POSTAL , C.COUNTRY FROM PS_RE_JOB_LOC A , %Table(LOCATION_TBL) C , %Table(SET_CNTRL_REC) B WHERE A.BUSINESS_UNIT = B.SETCNTRLVALUE AND B.RECNAME = 'LOCATION_TBL' AND B.SETID = C.SETID AND C.LOCATION = A.LOCATION AND C.EFFDT = ( SELECT MAX(C1.EFFDT) FROM %Table(LOCATION_TBL) C1 WHERE C.LOCATION = C1.LOCATION AND C1.SETID = B.SETID AND C1.EFF_STATUS = 'A' AND C1.EFFDT <= %CurrentDateIn) AND C.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 LOCATION Character(10) VARCHAR2(10) NOT NULL Location Code
3 ADDRESS1 Character(55) VARCHAR2(55) NOT NULL Address 1
4 ADDRESS2 Character(55) VARCHAR2(55) NOT NULL Address 2
5 ADDRESS3 Character(55) VARCHAR2(55) NOT NULL Address 3
6 ADDRESS4 Character(55) VARCHAR2(55) NOT NULL Address 4
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 COUNTRY Character(3) VARCHAR2(3) NOT NULL Country