日期:2014-05-19  浏览次数:20711 次

急!着急!sql 全文检索问题
sql全文检索问题
 
  SELECT   id   from   [business_info2]   where   contains(medicine_name,@search_title1   and   @search_title2)   order   by   id   desc  

语句老是报错。。。  
contains(medicine_name,@search_title1   and   @search_title2)  
说这种写法有问题。

大家帮帮忙。。

------解决方案--------------------
--try

declare @str nvarchar(1000)
set @str= ' " '+@search_title1+ ' " and " '+@search_title2+ ' " '
SELECT id from [business_info2]
where contains(medicine_name, @str)
order by id desc