我想在"test1和test2“上运行containstable,也想在关键字" and”上运行测试。
然而,下面的代码给了我一个错误:
containstable(table_name, column_name, 'test1 AND "and" test2')MSDN中的语法没有指明是否允许这样的关键字,以及它们是否可以使用。
谢谢,布鲁斯
发布于 2011-11-23 23:08:49
我找到了,答案是:
containstable(table_name, column_name, 'test1 AND "and test2"') 请注意,不只是"and",双引号还包括"and test2"
发布于 2011-11-23 22:40:54
看
http://msdn.microsoft.com/en-us/library/ms189760.aspx
其中一个示例的工作原理与您的测试类似。
containstable(table, column, '("sweet and savory" NEAR sauces) OR
("sweet and savory" NEAR candies)')修改约束以匹配您的数据。
编辑:我还应该指定'test1 AND "and" test2'无论如何都不是布尔条件。尝试:
'(test1 AND "and") OR (test2 AND "and")'或者类似于布尔条件的值。
https://stackoverflow.com/questions/8243886
复制相似问题