XPath ends-with
Last modified: January 19, 2026
Overview
The ends-with() function checks whether a string attribute ends with a specific string as a sub-string.
String comparisons in XPath constraints are generally case-insensitive, but this can depend on the collation setting for some databases. See Case-Sensitive Database Behavior for more information.
Example
This query returns all customers whose name ends with the sub-string sen:
[ends-with(Name, 'sen')]
//Sales.Customer[ends-with(Name, 'sen')]
Customers with the name "Jansen" or "Isaacsen" will be returned, for example, because both names end with "sen."