Sql 使用关键字";及;在稳定函数中
我想在“test1和test2”上运行Sql 使用关键字";及;在稳定函数中,sql,sql-server,Sql,Sql Server,我想在“test1和test2”上运行containstable,还想在关键字“and”上运行测试 但是,下面给出了一个错误: containstable(table_name, column_name, 'test1 AND "and" test2') from的语法没有指明是否允许使用这些关键字,以及它们是否可以使用 谢谢, 布鲁斯看看 其中一个例子的工作原理与您的测试类似 containstable(table, column, '("sweet and savory" NEAR sa
containstable
,还想在关键字“and”上运行测试
但是,下面给出了一个错误:
containstable(table_name, column_name, 'test1 AND "and" test2')
from的语法没有指明是否允许使用这些关键字,以及它们是否可以使用
谢谢,
布鲁斯看看
其中一个例子的工作原理与您的测试类似
containstable(table, column, '("sweet and savory" NEAR sauces) OR
("sweet and savory" NEAR candies)')
修改约束以匹配数据
编辑:我还应该指定“test1和”以及“test2”
无论如何都不是布尔条件。尝试:
'(test1 AND "and") OR (test2 AND "and")'
或者类似于布尔条件的东西。我找到了它,答案是:
containstable(table_name, column_name, 'test1 AND "and test2"')
请注意,双引号围绕着”和test2“
,而不仅仅是”和“