VFP 断号查询

数据表问题 | 2015-02-18 01:23:34 | 阅读 688 次 | 评论(0)
CREATE CURSOR test (数字 N(5,0))
INSERT INTO test values(7)
INSERT INTO test values(88)
INSERT INTO test values(9)
INSERT INTO test values(8)
INSERT INTO test values(103)
INSERT INTO test values(12)
INSERT INTO test values(11)
INSERT INTO test values(102)
INSERT INTO test values(101)
Sort To test_order_A On 数字
Create Cursor test1 (数字 N(5,0),起 I,止 I)
APPEND FROM test_order_A
Go Top
lnNum=数字
Scan For Recno()>1
    lnNum1=数字-lnNum
    If lnNum1>1
        Replace 起 With lnNum+1,止 With 数字-1
    EndIf
    lnNum=数字
EndScan
Browse For Not Empty(起)
Clear all
Erase test_order_A.Dbf
文章评论,共0条
游客请输入验证码
浏览234003次
最新评论
  • cstdio:ooooooo
  • sdta:从VFP入手也不错
  • yuanhouwen:尊敬的sdta大神:作为一个编程外行,看到你关于操控EXCEL的编程程序我觉得特别神奇,想向你...