EST_FPAS_BRA_VW

(SQL View)
Index Back

Estab - Fpas -Ent - History

Establishment FPAS Entities - History

SELECT A.ESTABID , A.START_DATE AS EFFDT , A.FPAS_CD_BRA , A.THIRD_PARTY_CD_BRA , B.ENT_CODE_BRA , B.ENT_PCT_BRA FROM %Table(E_FPAS_R_BRA_VW) A , %Table(FPAS_ENT_BRA) B , %Table(FPAS_TBL_BRA) C WHERE A.FPAS_CD_BRA = B.FPAS_CD_BRA AND A.THIRD_PARTY_CD_BRA = B.THIRD_PARTY_CD_BRA AND B.FPAS_CD_BRA = C.FPAS_CD_BRA AND B.EFFDT = C.EFFDT AND C.EFF_STATUS = 'A' AND B.EFFDT = ( SELECT MAX (B1.EFFDT) FROM %Table(FPAS_ENT_BRA) B1 WHERE A.FPAS_CD_BRA = B1.FPAS_CD_BRA AND A.THIRD_PARTY_CD_BRA = B1.THIRD_PARTY_CD_BRA AND B1.EFFDT <= A.START_DATE) UNION ALL SELECT A.ESTABID , B.EFFDT AS EFFDT , A.FPAS_CD_BRA , A.THIRD_PARTY_CD_BRA , B.ENT_CODE_BRA , B.ENT_PCT_BRA FROM %Table(E_FPAS_R_BRA_VW) A , %Table(FPAS_ENT_BRA) B , %Table(FPAS_TBL_BRA) C WHERE B.FPAS_CD_BRA = A.FPAS_CD_BRA AND B.THIRD_PARTY_CD_BRA = A.THIRD_PARTY_CD_BRA AND B.FPAS_CD_BRA = C.FPAS_CD_BRA AND B.EFFDT = C.EFFDT AND C.EFF_STATUS = 'A' AND B.EFFDT > A.START_DATE AND B.EFFDT < A.END_DATE

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 ESTABID Character(12) VARCHAR2(12) NOT NULL Establishment ID
2 EFFDT Date(10) DATE Effective Date

Default Value: %date

3 FPAS_CD_BRA Number(3,0) SMALLINT NOT NULL FPAS Social Assistant & Prevision Code
4 THIRD_PARTY_CD_BRA Number(4,0) SMALLINT NOT NULL Third Party Code
5 ENT_CODE_BRA Character(4) VARCHAR2(4) NOT NULL Entity Code.
6 ENT_PCT_BRA Number(6,2) DECIMAL(5,2) NOT NULL Entity Percentage