SELECT TABLEA CALCULATE MAX(FIELD1) TO lnMax DIMENSION aNumbers(lnMax, 2) STORE TABLEA.FIELD1 TO aNumbers COPY STRUCTURE TO TABLEB SELECT 0 USE TABLEB APPEND FROM ARRAY aNumbers REPLACE ALL FIELD1 WITH RECNO() SELECT * FROM TABLEB WHERE FIELD1 NOT IN (SELECT FIELD1 FROM TABLEA)