以文本方式查看主题 - Foxtable(狐表) (http://www.foxtable.com/bbs/index.asp) -- 专家坐堂 (http://www.foxtable.com/bbs/list.asp?boardid=2) ---- [求助]查询第一列 包含 某个字符串 (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=110019) |
-- 作者:whyxd -- 发布时间:2017/11/24 15:38:00 -- [求助]查询第一列 包含 某个字符串 一个字符串:str = “abcde” 在一列数据(列属性为字符串)中,找出这列中,str左包含的字符串, 例如:“a”; “ab”; “abc”; “abcd”; “abcde”
|
-- 作者:有点甜 -- 发布时间:2017/11/24 15:44:00 -- Dim str As String = "abcd" Dim t As Table = Tables("表A") Dim idxs As String = "-1," For Each dr As Row In t.rows If str.StartsWith(dr("第一列")) Then idxs &= dr("_Identify") & "," End If Next t.filter = "_Identify in (" & idxs.trim(",") & ")" |
-- 作者:whyxd -- 发布时间:2017/11/24 16:12:00 -- 回复:(有点甜)Dim str As String = "abcd"Dim t As... 明白了,谢谢 |