GPIN_ESTAB_VW

(SQL View)
Index Back

Establishment View

This table holds the Establishment ID's and names of companies.

SELECT DISTINCT I.ESTABID , E.DESCR , E.COMPANY , C.DESCR FROM PS_ESTAB_TBL E , PS_ESTAB_TBL_GPIN I , PS_COMPANY_TBL C WHERE E.ESTABID = I.ESTABID AND E.COMPANY = C.COMPANY AND E.EFFDT = ( SELECT MAX(EFFDT) FROM PS_ESTAB_TBL WHERE ESTABID = E.ESTABID AND EFFDT <= %CurrentDateIn) AND C.EFFDT = ( SELECT MAX(EFFDT) FROM PS_COMPANY_TBL WHERE COMPANY = C.COMPANY AND EFFDT <= %CurrentDateIn)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 ESTABID Character(12) VARCHAR2(12) NOT NULL Establishment ID

Prompt Table: ESTAB_TBL

2 DESCR Character(30) VARCHAR2(30) NOT NULL Description
3 COMPANY Character(3) VARCHAR2(3) NOT NULL Company
4 DESCR1 Character(30) VARCHAR2(30) NOT NULL Name