| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 391 人关注过本帖
标题:又有新问题,继续发贴求帮助
取消只看楼主 加入收藏
林三少
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2009-9-3
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:2 
又有新问题,继续发贴求帮助
程序代码:
use
USE ssc
CSTR1=[]
SCAN FOR rq=20130309
     CSTR=CSTR1+a5
ENDSCAN
? CSTR1
list CSTR to b1.txt
wait
CLEAR
*CSTR=[01234567890123456783456784567897890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567878]
AA=IIF(BETWEEN(LEFTC(CSTR,1),[0],[4]),[],[])
CREATE CURSOR T (A C(2),B N(2))
N=1
FOR I=1 TO LEN(CSTR)
    CSTRA=IIF(BETWEEN(SUBSTRC(CSTR,I,1),[0],[4]),[],[])
    IF CSTRA!=AA
       N=N+1
    ENDIF
    INSERT INTO T VALUES (CSTRA,N)
    AA=CSTRA
ENDFOR

SELECT A,B,CAST(COUNT(*) AS N(2)) C FROM T GROUP BY 2,1 INTO CURSOR T1
CALCULATE MAX(C) TO CS
N=0
CSTR=[]
FOR I=1 TO CS
    SCAN
       CSTR=CSTR+IIF(C-N<=0,[  ],A)+IIF(RECNO([T1])=RECCOUNT([T1]),CHR(13)+CHR(10),[])  
    ENDSCAN
    N=N+1
ENDFOR
*?CSTR
list CSTR to b2.txt
生成 b1.txt b2.txt
但b1 重复 很长如下:
 记录号  CSTR                                                                                                                    
        1  508907355871728119929072665379569048867812480944430586045041450238481077337689361465113785068795085377151644725484831298
        2  508907355871728119929072665379569048867812480944430586045041450238481077337689361465113785068795085377151644725484831298
         .
         .
         .
        7318  508907355871728119929072665379569048867812480944430586045041450238481077337689361465113785068795085377151644725484831298
        7319  508907355871728119929072665379569048867812480944430586045041450238481077337689361465113785068795085377151644725484831298
        7320  508907355871728119929072665379569048867812480944430586045041450238481077337689361465113785068795085377151644725484831298
7320多重复记录
b2 杂乱不连贯

记录号  CSTR                                             
        1  大小大小大小大小大小大小大小大小大小大小大小大小大
           小大小大小大小大小大小大小大小大小大小大小大小大小
           大小大小大小大小大小大小大小大小大
                             小大           大小大小
           小大小          小大小大    小大小大    
                                 小大
                                                大小
           小大                         小大  
           
                                                   
                                              
                                                     
                                                  
        2  大小大小大小大小大小大小大小大小大小大小大小大小大
           小大小大小大小大小大小大小大小大小大小大小大小大小
           大小大小大小大小大小大小大小大小大
                             小大           大小大小
           小大小          小大小大    小大小大    
                                 小大
                                                大小
           小大                         小大  
           
                                                   
                                              
                                                     
                                                  
        3  大小大小大小大小大小大小大小大小大小大小大小大小大
           小大小大小大小大小大小大小大小大小大小大小大小大小
           大小大小大小大小大小大小大小大小大
                             小大           大小大小
           小大小          小大小大    小大小大    
                                 小大
                                                大小
           小大                         小大  
           
                                                   
                                              
                                                     
                                                  


下面还有
***********************************************
请继续帮忙







2013-03-11 20:14
林三少
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2009-9-3
收藏
得分:0 
Visual FoxPro 项目.zip (48.83 KB)


多谢 所有文件已上传
2013-03-11 20:43
林三少
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2009-9-3
收藏
得分:0 
123.zip (5.69 KB)

将B2的记录做成附件一样的,连成一片。

也就是将SSC.dbf A5的记录娈成123附件一样连成一片。

谢谢老大帮忙。谢
2013-03-11 21:04
快速回复:又有新问题,继续发贴求帮助
数据加载中...
 
   



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

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