SELECT DISTINCT A.FIELDNAME , L.LANGUAGE_CD , BL.LONGNAME FROM PSXLATITEM A , PSDBFLDLABL B , PSDBFLDLABLLANG BL , PSLANGUAGES L WHERE %EffdtCheck(PSXLATITEM, A, %CurrentDateIn) AND A.EFF_STATUS = 'A' AND B.FIELDNAME = A.FIELDNAME AND B.DEFAULT_LABEL = 1 AND BL.FIELDNAME = B.FIELDNAME AND BL.LABEL_ID = B.LABEL_ID AND BL.LANGUAGE_CD = L.LANGUAGE_CD AND L.INSTALLED = 1 AND L.LANGUAGE_CD <> ( SELECT O.LANGUAGE_CD FROM PSOPTIONS O) UNION SELECT DISTINCT A.FIELDNAME , L.LANGUAGE_CD , B.LONGNAME FROM PSXLATITEM A , PSDBFLDLABL B , PSLANGUAGES L WHERE %EffdtCheck(PSXLATITEM, A, %CurrentDateIn) AND A.EFF_STATUS = 'A' AND B.FIELDNAME = A.FIELDNAME AND B.DEFAULT_LABEL = 1 AND L.INSTALLED = 1 AND L.LANGUAGE_CD <> ( SELECT O.LANGUAGE_CD FROM PSOPTIONS O) AND NOT EXISTS ( SELECT 'X' FROM PSDBFLDLABLLANG X WHERE X.FIELDNAME = A.FIELDNAME AND X.LANGUAGE_CD = L.LANGUAGE_CD)
|