以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- sql筛选问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=194155) |
-- 作者:qinqinwo1114 -- 发布时间:2024/11/14 15:43:00 -- sql筛选问题 Dim filter As String filter = "[项目ID] = \'" & id & "\'and [商品名] like\'%" & pl & "%\'" \'filter = "[项目ID] = \'" & id & "\'and [商品名] like ‘瓷砖’ or \' 墙砖\' or \'地砖\' " Dim drs As List(Of DataRow) = DataTables("装企通材料订单明细表").SQLSelect(filter) 如果查询项目ID为某个值,并且商品名包含:瓷砖或者墙砖或者地砖的行?上面代码不对,请教一下
|
-- 作者:有点蓝 -- 发布时间:2024/11/14 15:45:00 -- filter = "[项目ID] = \'" & id & "\' and ( [商品名] like \'%瓷砖%\' or [商品名] like \'%墙砖%\' or [商品名] like \'%地砖%\' )" |
-- 作者:qinqinwo1114 -- 发布时间:2024/11/14 15:47:00 -- 感谢 |