Quote:<proximity_term> Specifies a match of words or phrases that must be in the document that is being searched. Like the AND operator, <proximity_term> requires both the search terms to exist in the document being searched. NEAR | ~ Indicates that the word or phrase on each side of the NEAR or ~ operator must occur in a document for a match to be returned. Several proximity terms can be chained, as in a NEAR b NEAR c or a ~ b ~ c. Chained proximity terms must all be in the document for a match to be returned. When used in the CONTAINSTABLE function, the proximity of the search terms affects the ranking of each document. The nearer the matched search terms are in a document, the higher the ranking of the document. If matched search terms are >50 terms apart, the rank returned on the document is 0. For example, CONTAINS (column_name, 'fox NEAR chicken') and CONTAINSTABLE (table_name, column_name, 'fox ~ chicken') would both return any documents in the specified column that contain both "fox" and "chicken". In addition, CONTAINSTABLE returns a rank for each document based on the proximity of "fox" and "chicken". For example, if a document contains the sentence, "The fox ate the chicken," its ranking would be high... SQL SELECT Description FROM Production.ProductDescription WHERE CONTAINS(Description, 'bike NEAR performance');
SELECT Description FROM Production.ProductDescription WHERE CONTAINS(Description, 'bike NEAR performance');
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)