Incorrect results when combining full-text search and regular comparison create table &quot;Foo&quot;
(
&quot;id&quot; integer identity (1000, 1) not null,
&quot;name&quot; nvarchar(100) not null
)
alter table &quot;Foo&quot; add constraint &quot;Foo_PK&quot; primary key (&quot;id&quot;);
create fulltext index on &quot;Foo&quot; (&quot;name&quot; language 0x0) key index &quot;Foo_PK&quot; on &quot;catalog&quot; with stoplist = off;

The following query returns no rows
select * from &quot;Foo&quot; where contains(&quot;name&quot;, ' &quot;پ*&quot; ') and &quot;id&quot; &gt; 1082;

While there are 26 rows matched by contains(&quot;name&quot;, ' &quot;پ*&quot; ') and 87 matched by &quot;id&quot; &gt; 1082 individually. The following two queries have 23 rows in common, oddly, their intersection returns no rows.
select * from &quot;Foo&quot; where contains(&quot;name&quot;, ' &quot;پ*&quot; ');
select * from &quot;Foo&quot; where &quot;id&quot; &gt; 1082;

And more strangely, the following query returns exactly 23 rows. All &quot;id&quot;s are above 1082.
select * from &quot;Foo&quot; where contains(&quot;name&quot;, ' &quot;پ*&quot; ') and &quot;id&quot; &gt; 1081;

Someone please explain what is going on in SQL Server.
I think your primary problem is that you are using non-Unicode string delimiters for Unicode data.
Compare:
SELECT  ' &quot;پ*&quot; ';
SELECT N' &quot;پ*&quot; ';
-------^ this N is important