SELECT D.HRS_JOB_OPENING_ID , XL.LANGUAGE_CD , XL.DESCR , CL.GVT_ORG_TTL_DESCR , COALESCE(( SELECT NML.NAME_DISPLAY FROM PS_HRS_APP_NAME_LN NML WHERE NML.HRS_PERSON_ID = B.HRS_PERSON_ID AND NML.LANGUAGE_CD = XL.LANGUAGE_CD),B.NAME_DISPLAY) FROM PS_HRS_RCMNT_JOB A , PS_HRS_APPL_RPT_VW B , PS_HRS_JOB_OPENING D , PS_HRS_RCMNT J , PS_HRS_STS_TBL X , PS_HRS_STS_LNG XL , PS_JOBCODE_TBL C LEFT OUTER JOIN PS_JOBCODE_LANG CL ON (CL.JOBCODE = C.JOBCODE AND CL.EFFDT = C.EFFDT) WHERE A.HRS_PERSON_ID = B.HRS_PERSON_ID AND A.JOBCODE = C.JOBCODE AND C.SETID = ( SELECT G.SETID FROM PS_SET_CNTRL_GROUP G WHERE G.SETCNTRLVALUE = D.BUSINESS_UNIT AND G.REC_GROUP_ID = ( SELECT H.REC_GROUP_ID FROM PS_REC_GROUP_REC H WHERE H.RECNAME = 'HRS_JOBCODE_I')) AND C.EFFDT = ( SELECT MAX(I.EFFDT) FROM PS_HRS_JOBCODE_I I WHERE I.SETID = C.SETID AND I.JOBCODE = C.JOBCODE AND I.EFFDT <= %CurrentDateIn AND I.EFF_STATUS = 'A') AND J.HRS_PERSON_ID = A.HRS_PERSON_ID AND J.HRS_RCMNT_ID = A.HRS_RCMNT_ID AND J.HRS_JOB_OPENING_ID = D.HRS_JOB_OPENING_ID AND X.STATUS_AREA = '1' AND X.STATUS_CODE = D.STATUS_CODE AND XL.STATUS_AREA = '1' AND XL.STATUS_CODE = X.STATUS_CODE AND (XL.LANGUAGE_CD = CL.LANGUAGE_CD OR CL.LANGUAGE_CD IS NULL)
|