Skip to content

Commit b40e628

Browse files
authored
Fixes incorrect quotation of multiple word search
Using double-quotes in the `CONTAINS` search query gives an error; however, if you enclose the multiple word search with single quotes it works as expected
1 parent f887aea commit b40e628

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/relational-databases/search/full-text-search.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ A full-text index includes one or more character-based columns in a table. These
5959
```sql
6060
SELECT product_id
6161
FROM products
62-
WHERE CONTAINS(product_description, "Snap Happy 100EZ" OR FORMSOF(THESAURUS,'Snap Happy') OR '100EZ')
62+
WHERE CONTAINS(product_description, '"Snap Happy 100EZ"' OR FORMSOF(THESAURUS,'"Snap Happy"') OR '100EZ')
6363
AND product_cost < 200 ;
6464
```
6565

@@ -68,7 +68,7 @@ A full-text index includes one or more character-based columns in a table. These
6868
```sql
6969
SELECT candidate_name,SSN
7070
FROM candidates
71-
WHERE CONTAINS(candidate_resume,"SQL Server") AND candidate_division = 'DBA';
71+
WHERE CONTAINS(candidate_resume, '"SQL Server"') AND candidate_division = 'DBA';
7272
```
7373

7474
For more information, see [Query with Full-Text Search](../../relational-databases/search/query-with-full-text-search.md).

0 commit comments

Comments
 (0)