SELECT A.RECNAME ,B.SQLTABLENAME FROM PSRECFIELD A , PSRECDEFN B WHERE A.FIELDNAME = 'APPLID' AND A.RECNAME = B.RECNAME AND B.RECTYPE = 0 AND B.RECNAME NOT LIKE 'AUDIT%' AND B.RECNAME NOT LIKE '%TEO%' AND B.RECNAME NOT LIKE '%AET' AND B.RECNAME NOT LIKE '%TAO%' AND B.RECNAME NOT LIKE '%PERS%' AND B.RECNAME NOT LIKE '%PYER%' AND B.RECNAME NOT LIKE '%EARNS%' AND B.RECNAME <> 'PSHUP_TXN' AND B.RECNAME <> 'PSOPRALIAS' AND NOT EXISTS ( SELECT 'X' FROM PSRECFIELD A2 WHERE A2.FIELDNAME = 'APP_DT' AND A2.RECNAME = B.RECNAME)
|