HR_SRCH_COM_VW

(SQL View)
Index Back

Distinct Emplid Company

ThisView is used in Component Search for Review Garnshment where it is used to find different Company and Emplid.If there are 2 employee records in Job table,this view will help to pick distinct Company and Emplid

SELECT A.EMPLID ,A.COMPANY , MAX(A.EFFDT) , MAX(A.lastupddttm) FROM PS_JOB A WHERE A.EFFDT=( SELECT MAX(B.EFFDT) FROM PS_JOB B WHERE A.EMPLID=B.EMPLID AND A.EMPL_RCD=B.EMPL_RCD AND B.EFFDT<=%CurrentDateIn) AND A.effseq IN ( SELECT MAX(C.EFFSEQ) FROM PS_JOB C WHERE C.EMPLID=A.EMPLID AND C.EMPL_RCD=A.EMPL_RCD AND C.EFFDT=A.EFFDT) GROUP BY A.EMPLID,A.COMPANY

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
2 COMPANY Character(3) VARCHAR2(3) NOT NULL Company
3 EFFDT Date(10) DATE Effective Date

Default Value: %date

4 LASTUPDDTTM DateTime(26) TIMESTAMP Specifies the date and time of the last update to an entry. This field is maintained by PeopleSoft and is used in a variety of contexts.