Trying this answer and never getting any luck:

I'm while using SQLite Database browser (constructed with 3.3.5 from the SQLite engine) to complete this question:

SELECT columnX FROM MyTable

WHERE columnX LIKE  '%\%16'  ESCAPE '\'  

In column XI've got a row using the data: sampledata%167

I execute the statement and obtain no data came back but no error either?

(SQLite with C API)

I believe however , you're missing a % in the finish from the pattern.


Also backslashes frequently cause confusion in a variety of programming languages and tools, particularly if there's multiple amounts of parsing involved prior to the query reaches the database. To simplify things why not consider a different escape character rather:

WHERE columnX LIKE '%!%16%' ESCAPE '!'

Your sample data finishes in %167, however your query only matches things that finish in %16. You may want to improve your query to possess a trailing % or finish with 167 as the data does, based on your requirements.

After I do this in SQLite, it really works all right:

sqlite> create table foo (bar text);
sqlite> insert into foo (bar) values ('sampledata%167');
sqlite> select * from foo where bar like '%\%16' escape '\';
sqlite> select * from foo where bar like '%\%167' escape '\';

You might want to try experimentation with this particular within the SQLite spend, on the simple example table like I show, to ascertain if your condition still is available there.