Percent sign throwing "dict object does not support indexing error" error
SELECT * FROM table WHERE column LIKE '%''%' LIMIT 10
does not work. Searching for column that contains an apostrophe.
Maybe a problem with sqlalchemy as
engine.execute("SELECT * FROM table WHERE column LIKE '%''%' LIMIT 10")
doesn't work either.
SQLAlchemy docs: http://docs.sqlalchemy.org/en/rel_0_9/core/ddl.html?highlight=ddl#sqlalchemy.schema.DDL.params.statement
Single percent signs are to be escaped using double percent signs.
Therefore, the above code should
SELECT * FROM table WHERE column LIKE '%%''%%' LIMIT 10
Thinking of adding
cell = cell.replace('%', '%%')
right before the cell param is executed as SQL, but not quite sure yet of the repercussions.