The following Boolean operators may be used when full-text searching with an MS SQL database. These operators can be used by themselves or combined in a number of ways to create very specific search results. They are always placed between the keywords on which you are searching. With an MS SQL database, they may also be used in conjunction with phrases entered within double quotes.
For a description of all of the MS SQL search operators, see the Full Text Searching with MS SQL Reference.
Example: Smith AND Company
You may combine multiple AND operators on a single line.
The search results must contain all words in the search string; however, the words can be located anywhere in the text of the search results.
By default, each keyword line added to the search filter is considered an AND operator with respect to the other keyword lines. Similarly, putting two or more words in the keyword area without use of a Boolean operator is considered an AND search. For example, digital photos is the same as digital AND photos.
Example: Smith OR Company
You may combine multiple OR operators can be combined on a single line, which is the same as having multiple single-word lines.
Search results contain any of the words entered, all of them, or any combination.
Basic Boolean searches suit most of your needs, but you might want to narrow your search even further by applying more advanced operators. While advanced, they still resemble common thought processes used in making choices.
In addition to the two simple operators discussed above, with MS SQL full-text searching you can use the following operators.
Example: Smith AND NOT Wesson
Returns every entry that contains Smith but not Wesson.
Must be preceded with AND.
Cannot be used by itself; for example, "NOT Wesson" is not supported.
Search result must not contain the specified word.
Example: Davis NEAR Corporation
Use when you want two words in close proximity to one another.
Finds words up to 2 to 3 sentences apart, but won’t return results if words are 4 sentences apart.
Useful when dealing with large amounts of data with similar words, but in different contexts.