SELECT DISTINCT A.RECNAME , B.RECDESCR FROM PSRECFIELD A , PSRECDEFN B WHERE EXISTS ( SELECT 'X' FROM PSRECFIELD C WHERE A.RECNAME = C.RECNAME AND C.FIELDNAME = 'EOEN_LOG_KEY') AND EXISTS ( SELECT 'X' FROM PSRECFIELD D WHERE A.RECNAME = D.RECNAME AND (D.FIELDNAME = 'EOEN_AL_CTX_SBR' OR D.FIELDNAME = 'QRYNAME' OR D.FIELDNAME IN ( SELECT E.RECNAME FROM PSRECDEFN E WHERE E.RECTYPE = 3 AND EXISTS( SELECT 'X' FROM PSRECFIELD F WHERE F.FIELDNAME='QRYNAME' AND E.RECNAME = F.RECNAME)))) AND A.RECNAME = B.RECNAME AND B.RECTYPE = 0
|