Databases often treat %
and _
as wildcard characters. In pattern-match queries in the SQL repository (such as CONTAINS, STARTS WITH, or ENDS WITH), we assume that a query that includes %
or _
was intended as a literal search including those characters, and was not intended to include wildcard characters. The query generated therefore uses an escape character in front of the characters %
and _
in pattern-match queries. An exception is where we use a pattern-match query to simulate a text search query, since in that case we want to allow wildcards to be passed through.
You can disable this behavior by setting the escapeWildcards
property of the SQL repository component to false
.
The escape character is \
(backslash) by default. You can set a different escape character using the wildcardEscapeCharacter
property of the SQL repository component.