Error message in DB Console when using LIKE in WHERE clause

Issue #5 resolved
Julian Flatt created an issue

We are running a query from DB Console against our Jira instance (which has a MySQL database). The SQL query works fine until we try and filter the results down further with a WHERE clause which uses LIKE with wildcards. We need to filter the results based on the format of the users email_address. Example :-

WHERE DATEDIFF (NOW(), FROM_UNIXTIME(lastLogin.lastLoginMillis/1000)) >90 AND email_address LIKE '%anytext%'

When the SQL is run we get the following error message in the console :-

Error in executing SQL - URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "an"

We believe that the problem is that the wildcard character % is being interpreted as a URL encode rather than an SQL wildcard. Can you advise how we can avoid this problem while still using a wildcard in the where clause?

Comments (5)

  1. Renjith Pillai repo owner

    Julian, I never got notified about this issue from Bitbucket. Let me check it and update.

  2. Log in to comment