SELECT MLNG.LM_ADHC_LRN_ID , MLNG.LANGUAGE_CD , MLNG.LM_PRVD_BY , MLNG.LM_SUP_BY , MLNG.LM_FRE_FLD_FOUR , MLNG.LM_FRE_FLD_ONE , MLNG.LM_FRE_FLD_THREE , MLNG.LM_FRE_FLD_TWO , MLNG.LM_PER_TRN_NM , MLNG.LM_PER_TRN_DESCR , MLNG.LM_PER_TRN_LOC , MLNG.LM_PER_TRN_INST , TLNG.LM_ADHC_TYPE FROM PS_LM_ADHC_LRN_TBL M , PS_LM_ADHC_LRN_LNG MLNG , PS_LM_ADHC_TBL T , PS_LM_ADHC_LNG_TBL TLNG , PS_LM_ADH_APR_XREF X , PS_EOAW_STEPINST S , PS_EOAW_USERINST D WHERE M.LM_ADHC_LRN_ID = MLNG.LM_ADHC_LRN_ID AND MLNG.LANGUAGE_CD = TLNG.LANGUAGE_CD AND T.LM_ADHC_ID = M.LM_ADHC_ID AND %CurrentDateIn BETWEEN T.EFFDT AND T.LM_END_EFFDT AND T.LM_ADHC_ID = TLNG.LM_ADHC_ID AND T.EFFDT = TLNG.EFFDT AND M.LM_ADHC_LRN_ID = X.LM_ADHC_LRN_ID AND X.EOAWPRCS_ID = S.EOAWPRCS_ID AND X.EOAWDEFN_ID = S.EOAWDEFN_ID AND X.EOAWTHREAD_ID = S.EOAWTHREAD_ID AND D.EOAWSTEP_INSTANCE = S.EOAWSTEP_INSTANCE UNION SELECT MLNG.LM_ADHC_LRN_ID , MLNG.LANGUAGE_CD , MLNG.LM_PRVD_BY , MLNG.LM_SUP_BY , MLNG.LM_FRE_FLD_FOUR , MLNG.LM_FRE_FLD_ONE , MLNG.LM_FRE_FLD_THREE , MLNG.LM_FRE_FLD_TWO , MLNG.LM_PER_TRN_NM , MLNG.LM_PER_TRN_DESCR , MLNG.LM_PER_TRN_LOC , MLNG.LM_PER_TRN_INST , T.LM_ADHC_TYPE FROM PS_LM_ADHC_LRN_TBL M , PS_LM_ADHC_LRN_LNG MLNG , PS_LM_ADHC_TBL T , PS_LM_ADH_APR_XREF X , PS_EOAW_STEPINST S , PS_EOAW_USERINST D WHERE M.LM_ADHC_LRN_ID = MLNG.LM_ADHC_LRN_ID AND T.LM_ADHC_ID = M.LM_ADHC_ID AND %CurrentDateIn BETWEEN T.EFFDT AND T.LM_END_EFFDT AND M.LM_ADHC_LRN_ID = X.LM_ADHC_LRN_ID AND X.EOAWPRCS_ID = S.EOAWPRCS_ID AND X.EOAWDEFN_ID = S.EOAWDEFN_ID AND X.EOAWTHREAD_ID = S.EOAWTHREAD_ID AND D.EOAWSTEP_INSTANCE = S.EOAWSTEP_INSTANCE AND NOT EXISTS ( SELECT 1 FROM PS_LM_ADHC_LNG_TBL TLNG WHERE TLNG.LM_ADHC_ID = T.LM_ADHC_ID AND TLNG.EFFDT = T.EFFDT AND TLNG.LANGUAGE_CD = MLNG.LANGUAGE_CD) UNION SELECT M.LM_ADHC_LRN_ID , TLNG.LANGUAGE_CD , M.LM_PRVD_BY , M.LM_SUP_BY , M.LM_FRE_FLD_FOUR , M.LM_FRE_FLD_ONE , M.LM_FRE_FLD_THREE , M.LM_FRE_FLD_TWO , M.LM_PER_TRN_NM , M.LM_PER_TRN_DESCR , M.LM_PER_TRN_LOC , M.LM_PER_TRN_INST , TLNG.LM_ADHC_TYPE FROM PS_LM_ADHC_LRN_TBL M , PS_LM_ADHC_TBL T , PS_LM_ADHC_LNG_TBL TLNG , PS_LM_ADH_APR_XREF X , PS_EOAW_STEPINST S , PS_EOAW_USERINST D WHERE T.LM_ADHC_ID = M.LM_ADHC_ID AND %CurrentDateIn BETWEEN T.EFFDT AND T.LM_END_EFFDT AND T.LM_ADHC_ID = TLNG.LM_ADHC_ID AND T.EFFDT = TLNG.EFFDT AND M.LM_ADHC_LRN_ID = X.LM_ADHC_LRN_ID AND X.EOAWPRCS_ID = S.EOAWPRCS_ID AND X.EOAWDEFN_ID = S.EOAWDEFN_ID AND X.EOAWTHREAD_ID = S.EOAWTHREAD_ID AND D.EOAWSTEP_INSTANCE = S.EOAWSTEP_INSTANCE AND NOT EXISTS ( SELECT 1 FROM PS_LM_ADHC_LRN_LNG MLNG WHERE MLNG.LM_ADHC_LRN_ID = M.LM_ADHC_LRN_ID AND MLNG.LANGUAGE_CD = TLNG.LANGUAGE_CD )
|