SELECT RECNAME FROM PSRECDEFN A WHERE RECTYPE = 0 AND EXISTS ( SELECT 'X' FROM PSRECFIELDDB A2 , PS_FS_CF_TEMPLATE B2 WHERE A2.FIELDNAME=B2.FIELDNAME AND A2.RECNAME = A.RECNAME AND B2.CF_TYPE IN ('F', 'P') AND B2.FIELDNAME NOT IN ('BUSINESS_UNIT_PC', 'ACTIVITY_ID', 'RESOURCE_CATEGORY', 'RESOURCE_SUB_CAT', 'RESOURCE_TYPE')) AND EXISTS ( SELECT 'X' FROM PSRECFIELDDB A3 WHERE A3.RECNAME = A.RECNAME AND A3.FIELDNAME = 'EFF_STATUS') AND EXISTS ( SELECT 'X' FROM PSRECFIELDDB A4 WHERE A4.RECNAME = A.RECNAME AND A4.FIELDNAME = 'EFFDT_TO')
|