PC_CUR_LOC_VW2

(SQL View)
Index Back

Project Location View

This view contains all the same fields as the PROJECT_LOCATION record. However, the view SQL will only pick up the most current effective date row based on system date.

SELECT A.BUSINESS_UNIT , A.PROJECT_ID , A.EFFDT , A.LOCATION , LOC.DESCR , %Upper(LOC.CITY) , LOC.STATE , LOC.COUNTRY , LOC.POSTAL FROM PS_PROJ_LOCATION A , PS_PROJECT PRJ , PS_LOCATION_TBL LOC WHERE A.BUSINESS_UNIT = PRJ.BUSINESS_UNIT AND A.PROJECT_ID = PRJ.PROJECT_ID AND PRJ.SET_OVERRIDE = LOC.SETID AND A.LOCATION = LOC.LOCATION AND LOC.EFF_STATUS = 'A' AND A.EFFDT = ( SELECT MAX(B.EFFDT) FROM PS_PROJ_LOCATION B WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.PROJECT_ID = B.PROJECT_ID AND B.EFFDT <= %CurrentDateIn) AND A.EFFSEQ = ( SELECT MAX(C.EFFSEQ) FROM PS_PROJ_LOCATION C WHERE A.BUSINESS_UNIT = C.BUSINESS_UNIT AND A.PROJECT_ID = C.PROJECT_ID AND A.EFFDT = C.EFFDT) AND LOC.EFFDT = ( SELECT MAX(X.EFFDT) FROM PS_LOCATION_TBL X WHERE LOC.SETID = X.SETID AND LOC.LOCATION = X.LOCATION AND X.EFFDT <= %CurrentDateIn)

  • Parent record: PROJECT
  • # PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
    1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit

    Default Value: PROJECT.BUSINESS_UNIT

    2 PROJECT_ID Character(15) VARCHAR2(15) NOT NULL Project Id ChartField

    Prompt Table: PROJECT

    3 EFFDT Date(10) DATE Effective Date

    Default Value: %date

    4 LOCATION Character(10) VARCHAR2(10) NOT NULL Location Code
    5 LOCATION_DESCR Character(30) VARCHAR2(30) NOT NULL Location
    6 CITY Character(30) VARCHAR2(30) NOT NULL City
    7 STATE Character(6) VARCHAR2(6) NOT NULL State
    8 COUNTRY Character(3) VARCHAR2(3) NOT NULL Country
    9 POSTAL Character(12) VARCHAR2(12) NOT NULL Postal