查30.10,停在30.20的位置
CLOSE DATABASES all LOCAL ofile,sfile ofile=GETFILE([dbf],[确定成绩表]) sfile=GETFILE([dbf],[确定标准表]) USE (ofile) IN 0 ALIAS mb EXCLUSIVE USE (sfile) IN 0 ALIAS bz EXCLUSIVE *!* SELECT a.bmxh,MAX(b.fs) FROM mb a LEFT JOIN bz b ON a.xb=b.xb AND a.zx=b.xm AND b.cj-a.cj>=0 GROUP BY a.bmxh UPDATE mb SET mb.fs=c.fs from (SELECT a.bmxh,MAX(b.fs) as fs FROM mb a LEFT JOIN bz b ON a.xb=b.xb AND a.zx=b.xm AND b.cj-a.cj>=0 GROUP BY a.bmxh)c WHERE mb.bmxh=c.bmxh SELECT mb brow