SELECT sourcetable SCAN IF SEEK( 'sourcetable.id', 'targettable') SCATTER NAME oData *!* Then do some checking maybe to see if it really is more up-to-date SELECT TargetTable GATHER NAME oData ELSE APPEND BLANK IN TargetTable *!* initialize the fields ENDIF ENDSCAN> I am writting a program that import data from source table to my target table. There may has the same records in both table however the data in source table are more updated. If I use APPEND FROM command to import, there may has error for duplicate key.