Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Searching for the actual word "near" with Contains

Author  Topic 

greg.smalter
Starting Member

1 Post

Posted - 2008-03-19 : 15:05:20
The Full-Text Contains and ContainsTable queries have a bunch of keywords such as AND, OR, NEAR, etc. SQL Server Books Online does a poor job of explaining how to escape these keywords.

What if I want to do a CONTAINS search for the actual word "near?" How do I do that?

For example, if I have CONTAINSTABLE( Books, Title, @title) where the user enters their search term for @title on a web site, and happen to use the word "near," it's not good if SQL Server explodes (if "near" is the only term) or changes it behavior entirely.
   

- Advertisement -