SELECT ACT7.LM_ACT_ID , ACT7.LM_CI_ID , CITLNG7.LANGUAGE_CD , DMTYPLNG7.LM_DM_LONG_NM , DMTYPLNG7.LM_DM_SHRT_NM , CITLNG7.LM_CS_LONG_NM , CITLNG7.LM_CS_DESCR FROM PS_LM_ACT ACT7 , PS_LM_DMTHD_TBL DMALL7 , PS_LM_DMTH_TYP_TBL DMTYP7 , PS_LM_DMTH_TYP_LNG DMTYPLNG7 , PS_LM_CI_TBL CIT7 , PS_LM_CI_LANG CITLNG7 WHERE %Sql(LM_SRCHACTCI_NOMSG_RLNG_SQL,ACT7,DMALL7,DMTYP7,CIT7) AND CIT7.LM_CI_ID = CITLNG7.LM_CI_ID AND CIT7.EFFDT = CITLNG7.EFFDT AND CITLNG7.LANGUAGE_CD = DMTYPLNG7.LANGUAGE_CD AND DMTYP7.LM_DMTHD_TYPE_ID = DMTYPLNG7.LM_DMTHD_TYPE_ID UNION SELECT ACT7A.LM_ACT_ID , ACT7A.LM_CI_ID , DMTYPLNG7A.LANGUAGE_CD , DMTYPLNG7A.LM_DM_LONG_NM , DMTYPLNG7A.LM_DM_SHRT_NM , CIT7A.LM_CS_LONG_NM , CIT7A.LM_CS_DESCR FROM PS_LM_ACT ACT7A , PS_LM_DMTHD_TBL DMALL7A , PS_LM_DMTH_TYP_TBL DMTYP7A , PS_LM_DMTH_TYP_LNG DMTYPLNG7A , PS_LM_CI_TBL CIT7A WHERE %Sql(LM_SRCHACTCI_NOMSG_RLNG_SQL,ACT7A,DMALL7A,DMTYP7A,CIT7A) AND DMTYP7A.LM_DMTHD_TYPE_ID = DMTYPLNG7A.LM_DMTHD_TYPE_ID AND NOT EXISTS ( SELECT 1 FROM PS_LM_CI_LANG CITLNG7A WHERE CIT7A.LM_CI_ID = CITLNG7A.LM_CI_ID AND CIT7A.EFFDT = CITLNG7A.EFFDT AND CITLNG7A.LANGUAGE_CD = CITLNG7A.LANGUAGE_CD) UNION SELECT ACT7B.LM_ACT_ID , ACT7B.LM_CI_ID , CITLNG7B.LANGUAGE_CD , DMTYP7B.LM_DM_LONG_NM , DMTYP7B.LM_DM_SHRT_NM , CITLNG7B.LM_CS_LONG_NM , CITLNG7B.LM_CS_DESCR FROM PS_LM_ACT ACT7B , PS_LM_DMTHD_TBL DMALL7B , PS_LM_DMTH_TYP_TBL DMTYP7B , PS_LM_CI_TBL CIT7B , PS_LM_CI_LANG CITLNG7B WHERE %Sql(LM_SRCHACTCI_NOMSG_RLNG_SQL,ACT7B,DMALL7B,DMTYP7B,CIT7B) AND CIT7B.LM_CI_ID = CITLNG7B.LM_CI_ID AND CIT7B.EFFDT = CITLNG7B.EFFDT AND NOT EXISTS ( SELECT 1 FROM PS_LM_DMTH_TYP_LNG DMTYPLNG7B WHERE DMTYP7B.LM_DMTHD_TYPE_ID = DMTYPLNG7B.LM_DMTHD_TYPE_ID AND DMTYPLNG7B.LANGUAGE_CD = CITLNG7B.LANGUAGE_CD)
|