Isaac
Lifelong Learner
- Local time
- Today, 16:35
- Joined
- Mar 14, 2017
- Messages
- 10,852
SQL:
CONTAINS(doc.Result, '"Unit 2 of 2 PRBC's completed" | "phrase two" | "phrase three"')
Okay ... So I use Contains quite a bit in my T-SQL queries, and to start with here, I know that the above code is perfectly correct IF there was not an apostrophe in the search term (PRBC's).
In other words I'm certain that the various quotes are all correct but only IF I didn't have an apostrophe; I"m not sure what changes are indicated as I do.
I've discovered that Contains is quite the amazing thing, with literally dozens and dozens of ways to structure it, such that you could probably just about replace an NLP model in another language with a well structured series of Contains.
Every time I "poke" this bear, he gets messed up. What is the correct solution to transform what I have above into something that will accept the apostrophe? I did try MSDN and stack overflow; but the former as you will know if you've tried this on Contains would take, like, a year to master, and the latter is rife with too-specific different scenarios other than mine.