BEN_OE_APPR_VW(SQL View) |
Index Back |
---|---|
Insights Approval ViewNeeds approval data |
SELECT A.EMPLID , A.BEN_EVENT_TYPE , A.BEN_EVENT_SEQ , B.SEQ_NBR , B.STATUS , CASE WHEN (B.STATUS = 'A') THEN 'Active' ELSE CASE WHEN (B.STATUS = 'V') THEN 'Approved' ELSE CASE WHEN (B.STATUS = 'X') THEN 'Denied' ELSE CASE WHEN (B.STATUS = 'B') THEN 'PushBack' ELSE CASE WHEN (B.STATUS = 'D') THEN 'Deleted' ELSE CASE WHEN (B.STATUS = 'P') THEN 'Pending Approval' END END END END END END , CASE WHEN A.HR_ATT_SUB_ID = 'DEP' THEN 'DEPENDENT' END , CASE WHEN A.HR_ATT_SUB_ID = 'DEP' THEN 'DependentUpdates' END , %Coalesce((SELECT P.PHONE FROM PS_PERSONAL_PHONE P WHERE P.EMPLID = A.EMPLID AND P.PREF_PHONE_FLAG = 'Y'),'') , %Coalesce((SELECT A1.DESCR FROM PS_BEN_DEFN_PGM A1, PS_BEN_PROG_PARTIC B1 WHERE A1.BENEFIT_PROGRAM = B1.BENEFIT_PROGRAM AND B1.EMPLID = A.EMPLID AND B1.EMPL_RCD = 0 AND B1.EFFDT = (SELECT MAX(B2.EFFDT) FROM PS_BEN_PROG_PARTIC B2 WHERE B2.EMPLID = B1.EMPLID AND B2.EMPL_RCD = 0 AND B2.EFFDT <= %CurrentDateIn) AND A1.EFFDT = (SELECT MAX(A2.EFFDT) FROM PS_BEN_DEFN_PGM A2 WHERE A2.BENEFIT_PROGRAM = A1.BENEFIT_PROGRAM AND A2.EFFDT <= %CurrentDateIn)), '') , %Coalesce((SELECT S2.DESCR FROM PS_BAS_PARTIC S1, PS_BAS_SCHED S2 WHERE S1.EMPLID = C.EMPLID AND S1.BAS_ACTION_SOURCE = 'OE' AND S1.EVENT_CLASS = C.EVENT_CLASS AND S1.EVENT_DT = C.EVENT_DT AND S1.SCHED_ID = C.SCHED_ID AND S1.SCHED_ID = S2.SCHED_ID),'') , B.LAST_UPDATE_DTTM FROM PS_BEN_ATTACH_HDR A , PS_BEN_ATTACH_DTL B , PS_BEN_EVENT_VW C , PS_PTAI_LIST D WHERE A.EMPLID = B.EMPLID AND A.EMPLID = C.EMPLID AND A.BEN_EVENT_TYPE = 'DEPENDENT' AND A.BEN_EVENT_TYPE = B.BEN_EVENT_TYPE AND A.BEN_EVENT_SEQ = B.BEN_EVENT_SEQ AND A.PTAI_LIST_ID = D.PTAI_LIST_ID AND D.PTAI_INST_PKGROOT <> 'W3EB_LIFE_EVENT_FL' AND B.SEQ_NBR = ( SELECT MAX(C.SEQ_NBR) FROM PS_BEN_ATTACH_DTL C WHERE B.BEN_EVENT_TYPE = C.BEN_EVENT_TYPE AND B.EMPLID = C.EMPLID AND B.BEN_EVENT_SEQ = C.BEN_EVENT_SEQ AND B.STATUS = C.STATUS) |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | Character(11) | VARCHAR2(11) NOT NULL | Employee ID | |
2 | Character(10) | VARCHAR2(10) NOT NULL |
Benefits event types for attachments
D=Dependent L=Life Event O=Open Enrollment |
|
3 | Number(3,0) | SMALLINT NOT NULL | Benefits attachment sequence | |
4 | Number(15,0) | DECIMAL(15) NOT NULL | Sequence Number | |
5 | BEN_APPR_STATUS | Character(1) | VARCHAR2(1) NOT NULL | Benefits Approval status |
6 | BEN_APPR_DESCR | Character(20) | VARCHAR2(20) NOT NULL | Benefits Approval descr |
7 | BEN_EVENT_TYPE_DES | Character(30) | VARCHAR2(30) NOT NULL | Benefits event types for attachments |
8 | EOAWPRCS_ID | Character(30) | VARCHAR2(30) NOT NULL | Approval Process ID |
9 | WORK_PHONE | Character(24) | VARCHAR2(24) NOT NULL | Work Phone # |
10 | BENEFIT_PGM_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Benefit Program description |
11 | BAS_SCHED_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Bas Schedule description |
12 | LASTUPDDTTM | DateTime(26) | TIMESTAMP | Specifies the date and time of the last update to an entry. This field is maintained by PeopleSoft and is used in a variety of contexts. |