2,749
社区成员
发帖
与我相关
我的任务
分享

姓名可以重复,但学号不会重复
一个命令就可以
select 学生表.姓名,学生表.班级 from 学生表,毕业生总表 WHERE 学生表.姓名=毕业生总表.姓名 and 学生表.出生日期=毕业生总表.出生日期
local a,b,i,num
sele 1
b=thisform.text1.value
use &b alias bb
sele 2
a=thisform.text2.value
use &a alias aa
i=0
j=0
sele 2
do while .not.eof()
ly=xm
lq=csr
sele 1
locate for xm=ly .and. lq=csr
if found()
repl bb.序号 with ALLTRIM(bb.序号)+','+ALLTRIM(aa.序号)
i=i+1
else
sele 2
repl 标记 with '没有'
j=j+1
endif
sele 2
skip
enddo
sele 1
use
sele 2
use
?i