BN_COUNTRY_DFLT

(SQL View)
Index Back

Parent's Country as a Default

Retrieves the Parent employee's Counrty for his Home address for use as a default when managing Dependents.

SELECT A.EMPLID ,A.COUNTRY 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))))

  • Parent record: PERSON
  • # 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