GPNZ_PSLP_AD_VW

(SQL View)
Index Back

GP NZ Payslip Address Vw

Global Payroll New Zealand payslip address view

SELECT A.EMPLID ,%subrec(ADDRESS_SBR,A) FROM PS_ADDRESSES A WHERE A.ADDRESS_TYPE = 'HOME' AND A.EFFDT = ( SELECT MAX(B.EFFDT) FROM PS_ADDRESSES B WHERE B.EMPLID = A.EMPLID AND B.ADDRESS_TYPE = A.ADDRESS_TYPE AND (B.EFFDT <= %CurrentDateIn OR (B.EFFDT > %CurrentDateIn AND %CurrentDateIn < ( SELECT MIN(C.EFFDT) FROM PS_ADDRESSES C WHERE C.EMPLID = B.EMPLID AND C.ADDRESS_TYPE = B.ADDRESS_TYPE) ) ))

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
2 COUNTRY Character(3) VARCHAR2(3) NOT NULL Country

Prompt Table: COUNTRY_TBL

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 NUM1 Character(6) VARCHAR2(6) NOT NULL Number 1
9 NUM2 Character(6) VARCHAR2(6) NOT NULL Number 2
10 HOUSE_TYPE Character(2) VARCHAR2(2) NOT NULL House Type
AB=House Boat Reference
WW=House Trailer Reference
11 ADDR_FIELD1 Character(2) VARCHAR2(2) NOT NULL Address Field 1
12 ADDR_FIELD2 Character(4) VARCHAR2(4) NOT NULL Address Field 2
13 ADDR_FIELD3 Character(4) VARCHAR2(4) NOT NULL Address Field 3
14 COUNTY Character(30) VARCHAR2(30) NOT NULL County
15 STATE Character(6) VARCHAR2(6) NOT NULL State

Prompt Table: STATE_TBL

16 POSTAL Character(12) VARCHAR2(12) NOT NULL Postal
17 GEO_CODE Character(11) VARCHAR2(11) NOT NULL Geo Code
18 IN_CITY_LIMIT Character(1) VARCHAR2(1) NOT NULL In City Limit

Y/N Table Edit