'How do I escape parenthesis within a CONTAINS using T-SQL?

I want to have the following query:

SELECT COUNT(*) FROM MyTable WHERE
CONTAINS (MyField, '(429)')

The problem, is that the parenthesis are ignored and it is finding anything with "429". I just want "(429)" found. If I change it to have '"(429)"' that does not help (it still returns items with just "429").



Solution 1:[1]

Maybe you should explicitly convert (429) to a varchar.

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/a16434f3-5b94-44a1-a8cf-d66f832e1195/convert-integer-to-string

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Lane Goolsby