GPTH_BENEF_VWM1

(SQL View)
Index Back

EE Spouse Mother Depts/Benefs

GPTH_BENEF_VW4 is used to record an employee's dependents and beneficiaries. (Spouse Mother only)

SELECT A.EMPLID , C.NAME , D.RELATIONSHIP , B.NATIONAL_ID , C.NAME_PREFIX , C.FIRST_NAME , C.LAST_NAME FROM PS_DEP_BEN A , PS_DEP_BENEF_NID B , PS_DEP_BEN_NAME C , PS_DEP_BEN_EFF D WHERE D.DEP_BENEF_TYPE IN ('B','O') AND D.RELATIONSHIP = 'PI' AND D.SEX = 'F' AND B.COUNTRY = 'THA' AND B.NATIONAL_ID_TYPE = 'PID' AND A.EMPLID = B.EMPLID AND A.DEPENDENT_BENEF = B.DEPENDENT_BENEF AND A.EMPLID = C.EMPLID AND A.DEPENDENT_BENEF = C.DEPENDENT_BENEF AND A.EMPLID =D.EMPLID AND A.DEPENDENT_BENEF = D.DEPENDENT_BENEF AND D.EMPLID = C.EMPLID AND D.DEPENDENT_BENEF = C.DEPENDENT_BENEF AND C.EFFDT = ( SELECT MAX(C_ED.EFFDT) FROM PS_DEP_BEN_NAME C_ED WHERE C.EMPLID = C_ED.EMPLID AND C.DEPENDENT_BENEF = C_ED.DEPENDENT_BENEF AND C_ED.EFFDT <= %CurrentDateIn) AND D.EFFDT = ( SELECT MAX(D1.EFFDT) FROM PS_DEP_BEN_EFF D1 WHERE D1.EMPLID = D.EMPLID AND D1.DEPENDENT_BENEF = D.DEPENDENT_BENEF AND D1.EFFDT <= %CurrentDateIn)

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

Prompt Table: PERSON

2 NAME Character(50) VARCHAR2(50) NOT NULL Name
3 RELATIONSHIP Character(2) VARCHAR2(2) NOT NULL Relationship to Employee
4 NATIONAL_ID Character(20) VARCHAR2(20) NOT NULL National ID
5 NAME_PREFIX Character(4) VARCHAR2(4) NOT NULL Name Prefix
6 FIRST_NAME Character(30) VARCHAR2(30) NOT NULL First Name
7 LAST_NAME Character(30) VARCHAR2(30) NOT NULL Last Name