sele 1
use tmp1
sele 2
use tmp2
maxreco=max(recc(1),recc(2)) &&求最大记录,把你的问题一般化,合并前两表不一定记
&&录是相同的
create TABLE newtable( name1 c(5),name2 c(5))
for i=1 to mazreco
insert into newtable (name1,name2) values(tmp1.name1,temp2.name2)
sele 1
if !eof()
skip
endif
sele 2
if !eof()
skip
endif
next i