SELECT DISTINCT ENRV.INSTITUTION , ENRV.SCC_BRINCD_NLD , HN.SCC_LOB_CODE_NLD ,HCL.LANGUAGE_CD ,HCL.DESCR60 FROM PS_SSR_HEGISCD_NLD HN , PS_SSR_BR_ENRV_NLD ENRV , PS_HEGIS_CODE_TBL HC ,PS_HEGIS_CODE_LANG HCL WHERE HN.HEGIS_CODE = HC.HEGIS_CODE AND HN.EFFDT = HC.EFFDT AND HC.EFF_STATUS = 'A' AND HN.SCC_EDU_LEVEL_NLD IN ('HA', 'VWO', 'TL') AND (LENGTH(HN.SCC_LOB_CODE_NLD) = 4 OR HN.SCC_LOB_CODE_NLD IN (ENRV.SSR_BR_LOB_PAP_NLD, ENRV.SSR_BR_LOB_COM_NLD )) AND HN.EFFDT = ( SELECT MAX(H.EFFDT) FROM PS_HEGIS_CODE_TBL H WHERE HN.HEGIS_CODE = H.HEGIS_CODE AND H.EFFDT <= %CurrentDateIn) AND ENRV.EFFDT = ( SELECT MAX(ENRV1.EFFDT) FROM PS_SSR_BR_ENRV_NLD ENRV1 WHERE ENRV.INSTITUTION = ENRV1.INSTITUTION AND ENRV.SCC_BRINCD_NLD = ENRV1.SCC_BRINCD_NLD AND ENRV1.EFFDT <= %CurrentDateIn) AND HCL.HEGIS_CODE = HC.HEGIS_CODE AND HCL.EFFDT = HC.EFFDT ORDER BY 2
|