同分同名次排名问题
程序代码:
*--计算语文班名次 SELECT xm,bj,0000 AS ywbjmc FROM yclk ORDER BY bj,语文 DESC INTO CURSOR T1 readwrite SELECT T1 lcBJ=ALLTRIM(bj) I=1 SCAN IF ALLTRIM(bj)<>lcBJ lcBJ=ALLTRIM(bj) I=1 ENDIF REPLACE ywbjmc WITH I I=I+1 ENDSCAN SCAN UPDATE yclk SET ywbjmc=T1.ywbjmc WHERE xm=T1.xm AND bj=T1.bj ENDSCAN *--计算语文年级名次 SELECT xm,bj,0000 AS ywnjmc FROM yclk ORDER BY 语文 DESC INTO CURSOR T1 readwrite UPDATE T1 SET ywnjmc=RECNO() SCAN UPDATE yclk SET ywnjmc=T1.ywnjmc WHERE xm=T1.xm AND bj=T1.bj ENDSCAN
这个方法不能完成同分同名次。怎么解决?同时排出来班级名次,年级名次。