vfp删除重复记录并保留其中记录号最大的一条记录

作者在 2015-04-11 18:41:43 发布以下内容


* VFP9.0 CODE
Create Cursor Tt (Kh C(3))
Insert Into Tt Values ("001")
Insert Into Tt Values ("001")
Insert Into Tt Values ("002")
Insert Into Tt Values ("003")
Insert Into Tt Values ("001")
Insert Into Tt Values ("003")
Insert Into Tt Values ("002")
Insert Into Tt Values ("001")
Insert Into Tt Values ("002")
Insert Into Tt Values ("001")

Select *,Recno() as Bz From Tt Into Cursor Dd ReadWrite
Delete A From Dd A Inner Join Dd B On A.Kh=B.Kh AND A.Bz<B.Bz
Browse


VFP中SQL查询问题 | 阅读 3367 次
文章评论,共0条
游客请输入验证码
浏览379702次