SELECT A.SETID , A.INV_ITEM_ID , A.LANGUAGE_CD , A.DESCR , ( SELECT B.DESCR FROM PS_PROD_ITEM_LNG B WHERE B.SETID = A.SETID AND B.PRODUCT_ID = A.INV_ITEM_ID AND B.LANGUAGE_CD = A.LANGUAGE_CD) DESC1 FROM PS_MASTER_ITM_LANG A WHERE EXISTS ( SELECT 'X' FROM PS_PROD_ITEM_LNG D WHERE D.SETID = A.SETID AND D.PRODUCT_ID = A.INV_ITEM_ID AND D.LANGUAGE_CD = A.LANGUAGE_CD) UNION SELECT A.SETID , A.INV_ITEM_ID , A.LANGUAGE_CD , A.DESCR , ( SELECT B.DESCR FROM PS_PROD_ITEM B WHERE B.SETID = A.SETID AND B.PRODUCT_ID = A.INV_ITEM_ID) FROM PS_MASTER_ITM_LANG A WHERE NOT EXISTS ( SELECT 'X' FROM PS_PROD_ITEM_LNG D WHERE D.SETID = A.SETID AND D.PRODUCT_ID = A.INV_ITEM_ID AND D.LANGUAGE_CD = A.LANGUAGE_CD)
|