GPFR_GAR_DEP_VW(SQL View) |
Index Back |
---|---|
Garnishment Dependent CounterCounts of dependents and beneficiaries for garnishment |
SELECT A.EMPLID , A.EFFDT , COUNT(*) FROM PS_GPFR_NB_DEP_VW A , PS_DEP_BENEF_FRA B WHERE A.EMPLID = B.EMPLID AND B.EFFDT = ( SELECT MAX(EFFDT) FROM PS_DEP_BENEF_FRA C WHERE B.EMPLID = C.EMPLID AND B.DEPENDENT_BENEF = C.DEPENDENT_BENEF AND C.EFFDT <= A.EFFDT) AND B.GARNISH_STS_FRA = 'Y' GROUP BY A.EMPLID, A.EFFDT UNION SELECT AA.EMPLID , AA.EFFDT , 0 FROM PS_DEP_BENEF_FRA AA WHERE AA.GARNISH_STS_FRA = 'N' AND AA.EFFDT NOT IN ( SELECT BB.EFFDT FROM PS_DEP_BENEF_FRA BB WHERE BB.EMPLID = AA.EMPLID AND BB.GARNISH_STS_FRA = 'Y') |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | EMPLID | Character(11) | VARCHAR2(11) NOT NULL |
Employee ID
Prompt Table: PERSON |
2 | EFFDT | Date(10) | DATE |
Effective Date
Default Value: %date |
3 | COUNTER | Number(10,0) | DECIMAL(10) NOT NULL | Counter |