我正在尝试在其中执行带有全文搜索的 sp_executesql。
此查询运行良好。
exec sp_executesql
N'SELECT TOP (@p0) this_.org_id as y0_, this_.u_Name as y1_, this_.Category as y2_ FROM Organization this_
WHERE contains (this_.u_Name,@p1)'
,N'@p0 int,@p1 nvarchar(4000)',
@p0=1000,@p1=N'service'
但是我必须为单词变化添加一个变形形式,然后看起来参数 @p1 现在是空白的,并且查询没有返回任何结果。任何原因 ?如果我将@p1 替换为实际的“服务”一词,一切正常。
exec sp_executesql
N'SELECT TOP (@p0) this_.org_id as y0_, this_.u_Name as y1_, this_.Category as y2_ FROM Organization this_
WHERE contains (this_.u_Name,''formsOf(inflectional, @p1)'')'
,N'@p0 int,@p1 nvarchar(4000)',
@p0=1000,@p1=N'service'