OI_RSTYP_EFF_VW

(SQL View)
Index Back

Resource Type

Resource Type with Effective Start Date & End Date

SELECT SETID , RESOURCE_TYPE , EFFDT AS EFF_ST_DT , CASE WHEN LEAD(CONCAT(SETID ,RESOURCE_TYPE) ,1 ,NULL) OVER ( ORDER BY SETID ,RESOURCE_TYPE ,EFFDT) <> CONCAT (SETID ,RESOURCE_TYPE) THEN TO_DATE('9999-12-31' , 'YYYY-MM-DD') ELSE CASE WHEN LEAD(EFFDT ,1 ,NULL) OVER ( ORDER BY SETID ,RESOURCE_TYPE ,EFFDT) = EFFDT THEN EFFDT ELSE LEAD(EFFDT-1 ,1 ,TO_DATE('9999-12-31' , 'YYYY-MM-DD')) OVER ( ORDER BY SETID ,RESOURCE_TYPE ,EFFDT) END END AS EFF_END_DT FROM PS_PROJ_RES_TYPE ORDER BY 1 , 2 , 3

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID
2 RESOURCE_TYPE Character(5) VARCHAR2(5) NOT NULL Source Type
3 EFF_ST_DT Date(10) DATE Effective Start Date
4 EFF_END_DT Date(10) DATE Effective End Date