Is This Content Helpful?
We're glad to know this article was helpful.
Why does an XPATH expression with a CONTAINS function return different results than a similar SQL CONTAINS expression?
An XPATH expression with a CONTAINS function does not allow for Boolean operators. This is different from the SQL CONTAINS clause, which does allow Boolean operators.
For example, if a search is performed to search for all XML documents that contain the word dog or the word cat, this XPATH expression would be incorrect:
//*[contains(.,'dog OR cat')]
//*[contains(.,'dog') OR contains(.,'cat')]