0
我与本线程中的要求完全相同。 How to use JOIN LIKE with AND Operator in SQL Server?在SQL Server 2012中使用'AND'运算符的'LIKE'子句
尽管在网上查了几个小时,但我一直无能为力。
我有一个表'过滤器'列'值'和2记录它作为'Value1'和'Value2'作为varchar值。
Select * From MasterTable
Inner Join Filter ON MasterTable.Name LIKE '%' + Filter.Value + '%'
这意味着查询:
Select * From MasterTable
Where MasterTable.Name LIKE '%Value1%' OR MasterTable.Name LIKE '%Value2%'
现在,我怎么改变JOIN类似的手段,而不是OR?例如:
Select * From MasterTable
Where MasterTable.Name LIKE '%Value1%' AND MasterTable.Name LIKE '%Value2%'
任何人都可以告诉我一个出路。