SELECT M.LM_ENRLMT_ID , CLNG.LANGUAGE_CD , CLNG.LM_CS_DESCR , CLNG.LM_CS_LONG_NM , DLNG.LM_DM_LONG_NM FROM PS_LM_ENRLMT M , PS_LM_ACT A , PS_LM_CI_VW C , PS_LM_CI_VW_LNG CLNG , PS_LM_DMTH_TYP_TBL D , PS_LM_DMTH_TYP_LNG DLNG , PS_LM_PERSON P WHERE M.LM_ACT_ID = A.LM_ACT_ID AND M.LM_PERSON_ID = P.LM_PERSON_ID AND A.LM_CI_ID = C.LM_CI_ID AND C.LM_CI_ID = CLNG.LM_CI_ID AND CLNG.LANGUAGE_CD = DLNG.LANGUAGE_CD AND A.LM_DMTHD_TYPE_ID = D.LM_DMTHD_TYPE_ID AND D.LM_DMTHD_TYPE_ID = DLNG.LM_DMTHD_TYPE_ID AND EXISTS ( SELECT 1 FROM PS_LM_ENR_APR_XREF X WHERE X.LM_ENRLMT_ID = M.LM_ENRLMT_ID) UNION SELECT M.LM_ENRLMT_ID , DLNG.LANGUAGE_CD , C.LM_CS_DESCR , C.LM_CS_LONG_NM , DLNG.LM_DM_LONG_NM FROM PS_LM_ENRLMT M , PS_LM_ACT A , PS_LM_CI_VW C , PS_LM_DMTH_TYP_TBL D , PS_LM_DMTH_TYP_LNG DLNG , PS_LM_PERSON P WHERE M.LM_ACT_ID = A.LM_ACT_ID AND M.LM_PERSON_ID = P.LM_PERSON_ID AND A.LM_CI_ID = C.LM_CI_ID AND A.LM_DMTHD_TYPE_ID = D.LM_DMTHD_TYPE_ID AND D.LM_DMTHD_TYPE_ID = DLNG.LM_DMTHD_TYPE_ID AND EXISTS ( SELECT 1 FROM PS_LM_ENR_APR_XREF X WHERE X.LM_ENRLMT_ID = M.LM_ENRLMT_ID) AND NOT EXISTS ( SELECT 1 FROM PS_LM_CI_VW_LNG CLNG WHERE C.LM_CI_ID = CLNG.LM_CI_ID AND CLNG.LANGUAGE_CD = DLNG.LANGUAGE_CD ) UNION SELECT M.LM_ENRLMT_ID , CLNG.LANGUAGE_CD , CLNG.LM_CS_DESCR , CLNG.LM_CS_LONG_NM , D.LM_DM_LONG_NM FROM PS_LM_ENRLMT M , PS_LM_ACT A , PS_LM_CI_VW C , PS_LM_CI_VW_LNG CLNG , PS_LM_DMTH_TYP_TBL D , PS_LM_PERSON P WHERE M.LM_ACT_ID = A.LM_ACT_ID AND M.LM_PERSON_ID = P.LM_PERSON_ID AND A.LM_CI_ID = C.LM_CI_ID AND C.LM_CI_ID = CLNG.LM_CI_ID AND A.LM_DMTHD_TYPE_ID = D.LM_DMTHD_TYPE_ID AND EXISTS ( SELECT 1 FROM PS_LM_ENR_APR_XREF X WHERE X.LM_ENRLMT_ID = M.LM_ENRLMT_ID) AND NOT EXISTS ( SELECT 1 FROM PS_LM_DMTH_TYP_LNG DLNG WHERE D.LM_DMTHD_TYPE_ID = DLNG.LM_DMTHD_TYPE_ID AND CLNG.LANGUAGE_CD = DLNG.LANGUAGE_CD )
|