sele dist 科目 from 表a into curs tmp
lskm =""
scan lsc=padl(allt(科目),2,"0") lskm =lskm +padr(",'' 科目&lsc.等级",20)
endscan
sele dist 考号 &lskm from 表a into curs tmp readw
for kk=1 to len(lskm)/20 lsc =subs(lskm,at("科目",lskm,kk)+4,2) upda tmp set 科目&lsc.等级=表a.等级 from 表a where tmp.考号=表a.考号 .and.val(表a.科目)=val(lsc)
endfor
brow noed titl " >> 考生科目等级总览~"
retu