select * from tableA ; union ; select * from tableB ; into cursor AllInOne nofilter && AllInOne has unique recordsIf you had a pimary key and you only want to append tableB recs not in tableA :
select * from tableB ; where PKID not in ; (select PKID from tableA) ; into cursor crsNewRecs nofilter select tableA append from dbf('crsNewRecs')And another approach with scatter-gather assuming PKID exists and if PKID match but content different (no general field check) than tableB record takes precedence and getting data from tableB to A (instead of PKID a unique record might be identified by combined fields):
local loRecA,loRecB select tableB scan scatter name loRecB memo select TableA if !seek(tableB.PKID,'tableA','PKIDTag') && New append blank gather name loRecB memo else scatter name loRecA memo if !compobj(loRecA,loRecB) && If mismatch gather name loRecB memo && TableB takes precedence && (might be based on a timestamp check) else && Nothing here-match endif endif select TableB && Not needed really but I'm paranoid:) endscanCetin