SELECT B.FIELDNAME , C.LONGNAME , B.EDITTABLE FROM PSRECFIELD A , PSRECFIELD B , PSDBFLDLABL C WHERE A.RECNAME = 'CMP_RULE_VALUES' AND A.FIELDNAME <> 'CMP_RULE_ID' AND A.FIELDNAME <> 'EFFDT' AND A.FIELDNAME <> 'CMP_RULE_OPER_SEQ' AND A.FIELDNAME <> 'CMP_VALUE_SEQ' AND A.FIELDNAME <> 'CMP_FLD_VALUE' AND A.FIELDNAME <> 'CMP_FLD_VALUE_DT' AND A.FIELDNAME <> 'CMP_FLD_VALUE_DTTM' AND A.FIELDNAME <> 'CMP_FLD_VALUE_TM' AND B.FIELDNAME = C.FIELDNAME AND ((B.RECNAME = A.FIELDNAME AND A.SUBRECORD = 'Y') OR (A.RECNAME = B.RECNAME AND A.SUBRECORD = 'N' AND A.FIELDNAME = B.FIELDNAME)) AND C.DEFAULT_LABEL = 1
|