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,