标题:同分同名次排名问题
只看楼主
amis1232003
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2017-9-26
得分:0 
UPDATE yclk SET ywbjmc = 1+(sele COUNT(*) from yclk a WHERE a.语文 > yclk.语文 AND a.bj = yclk.bj )

2017-12-08 17:01
zky20001
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2017-6-14
得分:0 
回复 2楼 分号
最后那个压缩文件里面有个update,运行结果正确吧!
2017-12-22 14:06
jeckzy
Rank: 1
等 级:新手上路
威 望:1
帖 子:10
专家分:0
注 册:2006-4-25
得分:0 
use km in 0****科目库
use cj31 IN 0****成绩库

    sele km
         go top
        do while not eof()
        t_km=km
        
        *??'  '+km
            SELECT cj31

                SET ORDER TO &t_km
                GO top
                t_mc=1
                t_mc1=1
                t_cj=&t_km

            replace &t_km.mc with 1
                SKIP
                    DO while not EOF()
                        t_mc1=t_mc1+1
                        IF &t_km<t_cj
                            t_mc=t_mc1
                            t_cj=&t_km
                        ENDIF
                    replace &t_km.mc with t_mc
                    SKIP
                    ENDDO
        sele km
        skip
        endd
        sele cj31
        use
        sele km
        use
2019-06-05 14:51
jeckzy
Rank: 1
等 级:新手上路
威 望:1
帖 子:10
专家分:0
注 册:2006-4-25
得分:0 


use km in 0****科目库
use cj31 IN 0****成绩库

    sele km
         go top
        do while not eof()
        t_km=km
        
        *??'  '+km
            SELECT cj31

                SET ORDER TO &t_km
                GO top
                t_mc=1
                t_mc1=1
                t_cj=&t_km

            replace &t_km.mc with 1
                SKIP
                    DO while not EOF()
                        t_mc1=t_mc1+1
                        IF &t_km<t_cj
                            t_mc=t_mc1
                            t_cj=&t_km
                        ENDIF
                    replace &t_km.mc with t_mc
                    SKIP
                    ENDDO
        sele km
        skip
        endd
        sele cj31
        use
        sele km
        use
2019-06-05 14:58



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-481864-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.116905 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved