Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共8 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:判断数据是否存在?

1楼
1234567 发表于:2024/11/21 8:28:00
如何判断是否存在【第一列】数据为"A"的行
2楼
y2287958 发表于:2024/11/21 8:40:00
Find或Select均可

3楼
有点蓝 发表于:2024/11/21 8:53:00
http://www.foxtable.com/webhelp/topics/0396.htm
4楼
1234567 发表于:2024/11/21 8:56:00

如何查找第一列数据重复的行,并把后面的重复行删除?

5楼
有点蓝 发表于:2024/11/21 9:01:00
http://www.foxtable.com/webhelp/topics/1478.htm

http://www.foxtable.com/webhelp/topics/2712.htm

显示冗余值全部删除
6楼
1234567 发表于:2024/11/21 9:13:00

 

[此贴子已经被作者于2024/11/21 10:23:47编辑过]
7楼
1234567 发表于:2024/11/21 12:25:00
如何把下面的代码改成删除冗余值

 

Dim idx As String = "-1,"
Dim pdr As DataRow = Nothing
Dim cs As String = "客户,工序"
Dim flag As Boolean
For Each dr As DataRow In DataTables("询价表").Select("客户 is not null and 工序 is not null", cs)
    flag = False
    If pdr IsNot Nothing Then
        For Each c As String In cs.split(",")
            If pdr(c) <> dr(c) Then
                flag = True
                Exit For
            End If
        Next
    End If
    If flag Then
        idx &= pdr("_Identify") & ","
    End If
    pdr = dr
Next

If pdr IsNot Nothing Then
    idx &= pdr("_Identify") & ","
End If

Tables("询价表").filter = "_Identify in (" & idx.trim(",") & ") and 客户 is not null and 工序 is not null"

8楼
有点蓝 发表于:2024/11/21 15:58:00
Tables("询价表").filter  = "客户 is not null and 工序 is not null"
Tables("询价表").sort = "客户,工序"
for i as integer = Tables("询价表").rows.count - 1 to 1 step -1
if Tables("询价表").rows(i)("客户") = Tables("询价表").rows(i-1)("客户") andalso Tables("询价表").rows(i)("工序") = Tables("询价表").rows(i-1)("工序") then
Tables("询价表").rows(i).delete
end if
next
共8 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03516 s, 2 queries.