SELECT MAX(LEN(ALLTRIM(Field5))) AS MaxLength FROM .... INTO ARRAY aMaxLen IF aMaxLen[1] < 255 SELECT Field1, etc, SUBSTR(Field5,1,aMaxLen[1]) AS Field5... ELSE * ENDIF COPY TO () TYPE *>I forgot to mention there are fields in the table field1, field2, field3, field4, field5. Field5 in a memo field and I need to pull that info out as well into the textfile.