BEN_KIB_EOI_VW(SQL View) |
Index Back |
---|---|
Insights EOI VwEmployee EOI data |
SELECT C.SCHED_ID , B.EMPLID , C.BENEFIT_RCD_NBR , C.EVENT_ID , B.PLAN_TYPE , B.OPTION_ID , D.XLATLONGNAME , CASE WHEN ((%DateDiff( %CurrentDateIn, %DateAdd(C.EVENT_DT, C.DAYS_TO_NOTIFY)) ) < 0) THEN 0 ELSE %DateDiff( %CurrentDateIn, %DateAdd(C.EVENT_DT, C.DAYS_TO_NOTIFY)) END , CASE WHEN ((%DateDiff( %CurrentDateIn, %DateAdd(C.EVENT_DT, C.DAYS_TO_NOTIFY)) ) < 1) THEN '0' ELSE CASE WHEN ((%DateDiff( %CurrentDateIn, %DateAdd(C.EVENT_DT, C.DAYS_TO_NOTIFY)) ) BETWEEN 1 AND 7) THEN '01-07' ELSE CASE WHEN ((%DateDiff( %CurrentDateIn, %DateAdd(C.EVENT_DT, C.DAYS_TO_NOTIFY)) ) BETWEEN 8 AND 14) THEN '08-14' ELSE CASE WHEN ((%DateDiff( %CurrentDateIn, %DateAdd(C.EVENT_DT, C.DAYS_TO_NOTIFY)) ) BETWEEN 15 AND 21) THEN '15-21' ELSE CASE WHEN ((%DateDiff( %CurrentDateIn, %DateAdd(C.EVENT_DT, C.DAYS_TO_NOTIFY)) ) BETWEEN 22 AND 28) THEN '22-28' ELSE CASE WHEN ((%DateDiff( %CurrentDateIn, %DateAdd(C.EVENT_DT, C.DAYS_TO_NOTIFY)) ) > 28) THEN 'More than 28' END END END END END END , C.LIFE_EVENT_TYPE , C.LIFE_EVT_DESCR , C.EMAIL_ADDR , C.WORK_PHONE , %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 = B.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_SCHED S2 WHERE S2.SCHED_ID = B.SCHED_ID),'') , B.PROOF_REQ_IND , A.PROOF_RCVD , %CurrentDateTimeIn FROM PS_BAS_PARTIC_OPTN B ,PS_BAS_PARTIC_PLAN A , PS_BEN_KIB_PAR_VW C, PSXLATITEM D WHERE B.EMPLID = C.EMPLID AND B.EMPLID = A.EMPLID AND B.SCHED_ID = C.SCHED_ID AND B.SCHED_ID = A.SCHED_ID AND B.BENEFIT_RCD_NBR = C.BENEFIT_RCD_NBR AND B.BENEFIT_RCD_NBR = A.BENEFIT_RCD_NBR AND B.EVENT_ID = C.EVENT_ID AND B.EVENT_ID = A.EVENT_ID AND B.EVENT_DT = C.EVENT_DT AND B.EVENT_DT = A.EVENT_DT AND B.PLAN_TYPE = A.PLAN_TYPE AND B.OPTION_CD <> ' ' AND B.OPTION_CD = A.OPTION_CD AND D.FIELDNAME = 'PLAN_TYPE' AND D.FIELDVALUE = B.PLAN_TYPE AND %EffdtCheck(PSXLATITEM X, D, %CurrentDateIn) AND D.EFF_STATUS = 'A' |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | SCHED_ID | Character(6) | VARCHAR2(6) NOT NULL | Schedule ID |
2 | EMPLID | Character(11) | VARCHAR2(11) NOT NULL | Employee ID |
3 | BENEFIT_RCD_NBR | Number(3,0) | SMALLINT NOT NULL | Specifies a sequence number associated with each of multiple concurrent jobs for a one employee. It is used to determine the applicable benefit program for each job. The first job entered for an employee is automatically assigned a Benefit Record Number of zero (0). This field is linked with EMPL_RCD#, the Employment Record Number. |
4 | EVENT_ID | Number(6,0) | INTEGER NOT NULL | Event Identification |
5 | PLAN_TYPE | Character(2) | VARCHAR2(2) NOT NULL | Identifies a category of benefit plan, such as Medical, Dental, and Life (Insurance). A set of plan type codes, as well as rules for creating new codes, is provided by PeopleSoft. Plan Type codes determine how the system processes and defines eligibility for the various benefit plans. |
6 | OPTION_ID | Number(4,0) | SMALLINT NOT NULL | Option ID |
7 | PLAN_TYPE_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Plan Type Description |
8 | NUM_DAYS | Number(3,0) | SMALLINT NOT NULL | Number of Days |
9 | BNE_EXP_DT_DESCR | Character(50) | VARCHAR2(50) NOT NULL | determine Life Event AG expiration date range |
10 | LIFE_EVENT_TYPE | Character(3) | VARCHAR2(3) NOT NULL |
Type of Life Event (e.g. Birth, Adoption, Marriage)
A=Adoption B=Birth D=Divorce M=Marriage |
11 | LIFE_EVT_DESCR | Character(20) | VARCHAR2(20) NOT NULL | Life Event Descr |
12 | EMAIL_ADDR | Character(70) | VARCHAR2(70) NOT NULL | Email Address |
13 | WORK_PHONE | Character(24) | VARCHAR2(24) NOT NULL | Work Phone # |
14 | BENEFIT_PGM_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Benefit Program description |
15 | BAS_SCHED_DESCR | Character(30) | VARCHAR2(30) NOT NULL | Bas Schedule description |
16 | PROOF_REQ_IND | Character(1) | VARCHAR2(1) NOT NULL | Proof Required |
17 | PROOF_RCVD | Character(1) | VARCHAR2(1) NOT NULL | Proof Received |
18 | 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. |