You can translate the question and the replies:

Unable to make an HTTP search recognize an underscore (_) character as anything other than a wildcard

Hello, I am trying to execute a search using Denodo version 7.0 running on Linux Redhat 7, latest installed update: 7.0 20200310 The filter expression I am trying to specify is: like '%MRP\_%' ...but the query doesn't interpret the backslash '\' as an ESCAPE character; it seems to think it is part of the pattern itself. And if I leave out the the '\', it interprets the underscore as a single-character wildcard which is NOT what I want it to do. Can anybody tell me how to make the search pattern recognize the underscore character as an actual part of the search string?
user
24-03-2022 11:26:53 -0400
code

3 Answers

Hi, I was able to recreate this scenario with a special character in a filter/search pattern (both in **VQL Shell & HTTP search**) and used ‘**$**’ as the **escape character** to get the expected outcome. For example, consider a column with values ‘MRP II’, ‘MRP\_II’, ‘MRP$\_II’, below are the search results with & without ‘$’ as the escape character in the filter condition * *column like '%MRP\_%'* : results all three values * *column like '%MRP**$**\_%'* : results only ‘MRP\_II’ * *column like ‘%MRP**$**$\_%’* : results only ‘MRP$\_II’ Alternatively, I can **customize** the escape character in **VQL Shell** by using ‘**escape**’ clause. e.g. *code like ‘%MRP^%’ escape ‘^’*. Here I’m defining ‘^’ as the escape character in the search pattern. Hope this helps!
Denodo Team
25-03-2022 07:27:32 -0400
code
That did the trick - *thanks!*
user
28-03-2022 15:36:19 -0400
Hi, I'm glad that the suggestion worked for you!
Denodo Team
29-03-2022 08:07:54 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here