SELECT HS.EMPLID , HS.ACTION_DT_SS , HS.EFFSEQ , HS.HS_EMPLID , HS.REG_REGION , HS.IMMUN_CODE , HS.START_DATE , L.LANGUAGE_CD , COALESCE (( SELECT NL.NAME_DISPLAY FROM PS_NAMES_LNG NL WHERE NL.EMPLID = HS.EMPLID AND NL.NAME_TYPE = 'PRI' AND NL.LANGUAGE_CD = L.LANGUAGE_CD AND %EffdtCheck(NAMES_LNG NL1, NL, %CurrentDateIn)), ( SELECT N.NAME_DISPLAY FROM PS_NAMES N WHERE N.EMPLID = HS.EMPLID AND N.NAME_TYPE = 'PRI' AND %EffdtCheck(NAMES N1, N, %CurrentDateIn)), ' ') , COALESCE (( SELECT IML.DESCR FROM PS_HS_IMMUN_LANG IML WHERE IML.SETID = RR.DEFAULT_SETID AND IML.IMMUN_CODE = HS.IMMUN_CODE AND IML.LANGUAGE_CD = L.LANGUAGE_CD AND %EffdtCheck(HS_IMMUN_LANG IML1, IML, %CurrentDateIn)), ( SELECT IM1.DESCR FROM PS_HS_IMMUN_TBL IM1 WHERE IM1.SETID = RR.DEFAULT_SETID AND IM1.IMMUN_CODE = HS.IMMUN_CODE AND %EffdtCheck(HS_IMMUN_TBL IMED, IM1, %CurrentDateIn)), ' ') FROM PS_HS_SS_IMMUN_DAT HS , PSLANGUAGES L , PS_REG_REGION_TBL RR WHERE RR.REG_REGION = HS.REG_REGION
|