SELECT A.LM_ACT_ID , A.LM_LC_ID , D.LANGUAGE_CD , D.LM_LC_LONG_NM , E.LM_LC_TYPE_LONG FROM PS_LM_LC A , PS_LM_LC_TYPE_TBL B , PS_LM_ACT_ROUTES C , PS_LM_LC_LANG D , PS_LM_LC_TYPE_LANG E WHERE A.LM_ACT_ID = C.LM_ACT_ID AND A.LM_LC_ID = C.LM_LC_ID AND C.LM_ROUTE_ID = 1 AND B.LM_LC_TYPE_ID = A.LM_LC_TYPE_ID AND A.LM_LC_ID = D.LM_LC_ID AND A.LM_ACT_ID = D.LM_ACT_ID AND B.LM_LC_TYPE_ID = E.LM_LC_TYPE_ID AND D.LANGUAGE_CD = E.LANGUAGE_CD UNION SELECT A.LM_ACT_ID , A.LM_LC_ID , D.LANGUAGE_CD , A.LM_LC_LONG_NM , D.LM_LC_TYPE_LONG FROM PS_LM_LC A , PS_LM_LC_TYPE_TBL B , PS_LM_ACT_ROUTES C , PS_LM_LC_TYPE_LANG D WHERE A.LM_ACT_ID = C.LM_ACT_ID AND A.LM_LC_ID = C.LM_LC_ID AND C.LM_ROUTE_ID = 1 AND B.LM_LC_TYPE_ID = A.LM_LC_TYPE_ID AND B.LM_LC_TYPE_ID = D.LM_LC_TYPE_ID AND NOT EXISTS ( SELECT 'X' FROM PS_LM_LC_LANG E WHERE E.LM_ACT_ID = A.LM_ACT_ID AND E.LM_LC_ID = A.LM_LC_ID AND E.LANGUAGE_CD = D.LANGUAGE_CD) UNION SELECT A.LM_ACT_ID , A.LM_LC_ID , D.LANGUAGE_CD , D.LM_LC_LONG_NM , B.LM_LC_TYPE_LONG FROM PS_LM_LC A , PS_LM_LC_TYPE_TBL B , PS_LM_ACT_ROUTES C , PS_LM_LC_LANG D WHERE A.LM_ACT_ID = C.LM_ACT_ID AND A.LM_LC_ID = C.LM_LC_ID AND C.LM_ROUTE_ID = 1 AND B.LM_LC_TYPE_ID = A.LM_LC_TYPE_ID AND A.LM_ACT_ID = D.LM_ACT_ID AND A.LM_LC_ID = D.LM_LC_ID AND NOT EXISTS ( SELECT 'X' FROM PS_LM_LC_TYPE_LANG E WHERE E.LM_LC_TYPE_ID = B.LM_LC_TYPE_ID AND E.LANGUAGE_CD = D.LANGUAGE_CD)
|