SELECT B.LM_ACT_ID , B.LM_LC_ID , B.LM_SES_ID , A1.LM_FCLTY_ID ,A1.LANGUAGE_CD ,A.COUNTRY ,C.DESCR ,A.STATE ,D.DESCR FROM PS_LM_FCLTY_TBL A , PS_LM_FCLTTBL_LANG A1 , PS_LM_SES_VW B , PS_COUNTRYTBL_LANG C , PS_STATE_TBL_LANG D WHERE A.LM_FCLTY_ID=B.LM_FCLTY_ID AND A.LM_FCLTY_ID=A1.LM_FCLTY_ID AND A1.LANGUAGE_CD=C.LANGUAGE_CD AND A.COUNTRY=C.COUNTRY AND A1.LANGUAGE_CD=D.LANGUAGE_CD AND C.COUNTRY=D.COUNTRY AND A.STATE=D.STATE UNION SELECT B.LM_ACT_ID , B.LM_LC_ID , B.LM_SES_ID , A.LM_FCLTY_ID ,C.LANGUAGE_CD ,A.COUNTRY ,C.DESCR ,A.STATE ,D.DESCR FROM PS_LM_FCLTY_TBL A , PS_LM_SES_VW B , PS_COUNTRYTBL_LANG C , PS_STATE_TBL_LANG D WHERE A.LM_FCLTY_ID=B.LM_FCLTY_ID AND A.COUNTRY=C.COUNTRY AND C.LANGUAGE_CD=D.LANGUAGE_CD AND C.COUNTRY=D.COUNTRY AND A.STATE=D.STATE AND NOT EXISTS ( SELECT 'X' FROM PS_LM_FCLTTBL_LANG A2 WHERE A2.LM_FCLTY_ID=A.LM_FCLTY_ID AND A2.LANGUAGE_CD=C.LANGUAGE_CD) UNION SELECT B.LM_ACT_ID , B.LM_LC_ID , B.LM_SES_ID , A.LM_FCLTY_ID ,A1.LANGUAGE_CD ,A.COUNTRY ,C.DESCR ,A.STATE ,D.DESCR FROM PS_LM_FCLTY_TBL A , PS_LM_FCLTTBL_LANG A1 , PS_LM_SES_VW B , PS_COUNTRY_TBL C , PS_STATE_TBL_LANG D WHERE A.LM_FCLTY_ID=B.LM_FCLTY_ID AND A.LM_FCLTY_ID=A1.LM_FCLTY_ID AND A.COUNTRY=C.COUNTRY AND A1.LANGUAGE_CD=D.LANGUAGE_CD AND C.COUNTRY=D.COUNTRY AND A.STATE=D.STATE AND NOT EXISTS ( SELECT 'X' FROM PS_COUNTRYTBL_LANG C1 WHERE C1.COUNTRY=C.COUNTRY AND C1.LANGUAGE_CD= A1.LANGUAGE_CD) UNION SELECT B.LM_ACT_ID , B.LM_LC_ID , B.LM_SES_ID , A.LM_FCLTY_ID ,A1.LANGUAGE_CD ,A.COUNTRY ,C.DESCR ,A.STATE ,D.DESCR FROM PS_LM_FCLTY_TBL A , PS_LM_FCLTTBL_LANG A1 , PS_LM_SES_VW B , PS_COUNTRYTBL_LANG C , PS_STATE_TBL D WHERE A.LM_FCLTY_ID=B.LM_FCLTY_ID AND A.LM_FCLTY_ID=A1.LM_FCLTY_ID AND A1.LANGUAGE_CD=C.LANGUAGE_CD AND A.COUNTRY=C.COUNTRY AND C.COUNTRY=D.COUNTRY AND A.STATE=D.STATE AND NOT EXISTS ( SELECT 'X' FROM PS_STATE_TBL_LANG D1 WHERE D1.COUNTRY=D.COUNTRY AND D1.LANGUAGE_CD= A1.LANGUAGE_CD) UNION SELECT B.LM_ACT_ID , B.LM_LC_ID , B.LM_SES_ID , A.LM_FCLTY_ID ,D.LANGUAGE_CD ,A.COUNTRY ,C.DESCR ,A.STATE ,D.DESCR FROM PS_LM_FCLTY_TBL A , PS_LM_SES_VW B , PS_COUNTRY_TBL C , PS_STATE_TBL_LANG D WHERE A.LM_FCLTY_ID=B.LM_FCLTY_ID AND A.COUNTRY=C.COUNTRY AND C.COUNTRY=D.COUNTRY AND A.STATE=D.STATE AND NOT EXISTS ( SELECT 'X' FROM PS_LM_FCLTTBL_LANG A2 WHERE A2.LM_FCLTY_ID=A.LM_FCLTY_ID AND A2.LANGUAGE_CD=D.LANGUAGE_CD) AND NOT EXISTS ( SELECT 'X' FROM PS_COUNTRYTBL_LANG C1 WHERE C1.COUNTRY=C.COUNTRY AND C1.LANGUAGE_CD= D.LANGUAGE_CD) UNION SELECT B.LM_ACT_ID , B.LM_LC_ID , B.LM_SES_ID , A.LM_FCLTY_ID ,A1.LANGUAGE_CD ,A.COUNTRY ,C.DESCR ,A.STATE ,D.DESCR FROM PS_LM_FCLTY_TBL A , PS_LM_FCLTTBL_LANG A1 , PS_LM_SES_VW B , PS_COUNTRY_TBL C , PS_STATE_TBL D WHERE A.LM_FCLTY_ID=B.LM_FCLTY_ID AND A.LM_FCLTY_ID=A1.LM_FCLTY_ID AND A.COUNTRY=C.COUNTRY AND C.COUNTRY=D.COUNTRY AND A.STATE=D.STATE AND NOT EXISTS ( SELECT 'X' FROM PS_STATE_TBL_LANG D1 WHERE D1.STATE=D.STATE AND D1.LANGUAGE_CD=A1.LANGUAGE_CD) AND NOT EXISTS ( SELECT 'X' FROM PS_COUNTRYTBL_LANG C1 WHERE C1.COUNTRY=C.COUNTRY AND C1.LANGUAGE_CD= A1.LANGUAGE_CD) UNION SELECT B.LM_ACT_ID , B.LM_LC_ID , B.LM_SES_ID , A.LM_FCLTY_ID ,C.LANGUAGE_CD ,A.COUNTRY ,C.DESCR ,A.STATE ,D.DESCR FROM PS_LM_FCLTY_TBL A , PS_LM_SES_VW B , PS_COUNTRYTBL_LANG C , PS_STATE_TBL D WHERE A.LM_FCLTY_ID=B.LM_FCLTY_ID AND A.COUNTRY=C.COUNTRY AND C.COUNTRY=D.COUNTRY AND A.STATE=D.STATE AND NOT EXISTS ( SELECT 'X' FROM PS_STATE_TBL_LANG D1 WHERE D1.STATE=D.STATE AND D1.LANGUAGE_CD=C.LANGUAGE_CD) AND NOT EXISTS ( SELECT 'X' FROM PS_LM_FCLTTBL_LANG A2 WHERE A2.LM_FCLTY_ID=A.LM_FCLTY_ID AND A2.LANGUAGE_CD=C.LANGUAGE_CD)
|