E_FPAS_R_BRA_VW

(SQL View)
Index Back

Date ranges for Estab EFFDT

Date ranges for Estab EFFDT

SELECT A.ESTABID , A.effdt AS start_date , B.effdt AS end_date , A.FPAS_CD_BRA , A.THIRD_PARTY_CD_BRA FROM %Table(ESTAB_TBL_BRA) A , %Table(ESTAB_TBL_BRA) B WHERE B.EFFDT = ( SELECT MIN (B1.EFFDT) FROM %Table(ESTAB_TBL_BRA) B1 WHERE B1.EFFDT > A.EFFDT AND A.ESTABID=B1.ESTABID) UNION SELECT A.ESTABID , A.effdt AS start_date , %DateIn ('2999,12,31') AS end_date , A.FPAS_CD_BRA , A.THIRD_PARTY_CD_BRA FROM %Table(ESTAB_TBL_BRA) A , %Table(ESTAB_TBL_BRA) B WHERE A.ESTABID = B.ESTABID AND A.EFFDT = ( SELECT MAX (A1.EFFDT) FROM PS_ESTAB_TBL_BRA A1 WHERE A.ESTABID = A1.ESTABID) AND A.FPAS_CD_BRA = B.FPAS_CD_BRA AND A.THIRD_PARTY_CD_BRA = B.THIRD_PARTY_CD_BRA

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 ESTABID Character(12) VARCHAR2(12) NOT NULL Establishment ID
2 START_DATE Date(10) DATE Start Date for Gen Standing PO
3 END_DATE Date(10) DATE End Date
4 FPAS_CD_BRA Number(3,0) SMALLINT NOT NULL FPAS Social Assistant & Prevision Code
5 THIRD_PARTY_CD_BRA Number(4,0) SMALLINT NOT NULL Third Party Code