我有这个存储过程,带有INFLECTIONAL支持的全文索引搜索。 下面的代码似乎有问题,两个单词抛出错误信息。
没有错误
INNER JOIN CONTAINSTABLE (ProductRequest, (Abstract , Cause , Description ), 'FORMSOF(INFLECTIONAL,''emailaddress'') OR ''windowsproduct''' ) AS KEY_TBL
语法错误
//Note the white space in email address
INNER JOIN CONTAINSTABLE (Table2, (Abstract , Cause , Description ), 'FORMSOF(INFLECTIONAL,''email address'') OR ''windowsproduct''' ) AS KEY_TBL
//Msg 7630, Level 15, State 3, Line 1
//Syntax error near 'ddress'' in the full-text search condition 'FORMSOF(INFLECTIONAL,'emaila ddress') OR 'windowsproduct''.
//Note the white space at the end of email address
INNER JOIN CONTAINSTABLE (Table2, (Abstract , Cause , Description ), 'FORMSOF(INFLECTIONAL,''emailaddress '') OR ''windowsproduct''' ) AS KEY_TBL
//Msg 7630, Level 15, State 3, Line 1
//Syntax error near ''' in the full-text search condition 'FORMSOF(INFLECTIONAL,'emailaddress ') OR 'windowsproduct''.
有人能告诉我正确的语法吗?
答案 0 :(得分:0)
当您搜索短语时,必须使用双引号,但您使用的是两个单引号。 试试这个:
INNER JOIN CONTAINSTABLE (ProductRequest,
(Abstract , Cause , Description ),
'FORMSOF(INFLECTIONAL,"email address") OR "windowsproduct"' ) AS KEY_TBL