Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

SQL Server CONTAINS and parentheses usage with wildcards

$
0
0

We have a SQL query that returns different results depending on whether the query terms are in parentheses or not and we cannot figure out why this is the case - see below 

SELECT*FROM dbo.TABLE_X WHERE(CONTAINS(DOCUMENT_NAME,'"(rev* rec*)"'))

- returns 4 rows

SELECT*FROM dbo.TABLE_X WHERE(CONTAINS(DOCUMENT_NAME,'"rev* rec*"'))

- returns 14 rows

 

So why do the parens in the first CONTAINS negate the wildcards?  Is this a SQL bug or am I missing something here.  If missing something, please help us understand what is going on here.

Thanks,


Viewing all articles
Browse latest Browse all 15694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>