使用全文目录时如何连接两列?

时间:2019-04-16 06:42:52

标签: sql sql-server stored-procedures concat freetext

我有一个启用了全文本的表。但是我无法使用FirstName + MiddleName + LastName之类的FREETEXT进行串联搜索。您能帮我摆脱这个问题吗?

 SET @queryclause= '( FREETEXT(concat(FirstName,'' '',LastName),'''+@filter+''') OR FREETEXT(FirstName,'''+@filter+''') OR FREETEXT(LastName,'''+ 
    @filter+''') OR FREETEXT(MiddleName,'''+@filter+''') OR FREETEXT(OrganizationName,'''+ 
    @filter+''') OR FREETEXT(Mobile,'''+@filter+''') OR FREETEXT(JobTitle,'''+@filter+ 
    ''') OR FREETEXT(City,'''+@filter+''') OR FREETEXT(State,'''+@filter+ 
    ''') OR FREETEXT(Country,'''+@filter+''') OR FREETEXT(Industry,'''+@filter+ 
    ''') OR FREETEXT(SicCode,'''+@filter+''') OR FREETEXT(SicCode,'''+@filter+ 
    ''') OR FREETEXT(InternalRemarks,'''+@filter+''') )' end

0 个答案:

没有答案