以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  like运算  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=147917)

--  作者:fendouww
--  发布时间:2020/3/27 9:29:00
--  like运算
我想以输入某个特定字符然后以字符分割,like运算包含的每一段分割的字符,代码要如何写?我以下不能成功

If ff.Value IsNot Nothing Then
    If ff.value.Contains("|") Then
        Filter = Filter & " and " & "货期 In (\'" & ff.Value.Replace("|","\',\'") & "\')"
    ElseIf ff.value.Contains("@") Then
        Filter = Filter & " And " & "(货期 Like \'%" & ff.Value.Replace("@"," & "%\' or 货期 like \'%" & ") & "%\')"
    Else
        Filter = Filter & " and " & "货期 like \'%" & ff.Value & "%\'"
    End If
End If


--  作者:有点蓝
--  发布时间:2020/3/27 11:48:00
--  
Filter = Filter & " And " & "(货期 Like \'%" & ff.Value.Replace("@","%\' or 货期 like \'%")  & "%\')"