回复 9楼 kiff
高,SQL真的很强大!
谢谢大家
close databases *Use 表1 In 0 Use 表2 In 0 create cursor 表3 (zz c(10),x1 n(10,1),y1 n(10,1),x2 n(10,1),y2 n(10,1)) append from 表1 fields zz,x1,y1 index on zz tag zz select 表2 set relation to zz into 表3 scan if found("表3") replace 表3.x2 with 表2.x2,表3.y2 with 表2.y2 in 表3 else insert into 表3 (zz,x2,y2) values (表2.zz,表2.x2,表2.y2) endif endscan set relation to select 表3 browse