重新写一次:
select stu
copy stru extend to lstmep
sele 0
use lstemp
tj='repl '
go top
scan
tj=tj+allt(field_name)+' with student.'+allt(field_name)+','
endscan
tj=substring(tj,1,len(allt(tj))-1)
use
select stu
go top
scan
sele student
loca for 编号=stu.编号
if found()
&tj
endif
endscan
还有点错误:
tj=tj+allt(field_name)+' with student.'+allt(field_name)
改为tj=tj+allt(field_name)+' with student.'+allt(field_name)+','
循环完成后加一句
tj=substring(tj,1,len(allt(tj))-1)
写错一句话:
copy to stru to lstmep
改为copy stru extend to lstemp
(如果你的def的库结构就是要更新的字段内容)
其实可以不要def表的,只要有stu及student两个表就行了,将上一句改为
sele 0
use stu
copy stru extend to lstemp
就可以了!