> select table2 && Note, that we need to open table2 only once, not in the scan > append from dbf("crsRand") > select crsRand >scan > goto rn in Table1 && move record pointer to rn record in table1 > delete in Table1 >endscan > > *delete from table1 where recno() in (select rn from crsRand) > *use in crsRand && we do not need our crsRand anymore > >>thanks
local lnRecNum select crsRand scan lnRecNum = crsRand.rn goto m. lnRecNum in Table1 && move record pointer to rn record in table1 delete in Table1 endscan