I need to get query results with multiple like
filters, like this:
select *
from public.data
where namep like '%YA%' and comm like '%comm' and state = %(region)s
limit 10
But when I'm trying to execute this query with psycopg2 I'm getting the error:
'dict' object does not support indexing.
I found that this error occurs due to the first and second like
statements with '%'
. In my original query there several '%'
symbols and like
filter, so I can't change them.
I can't find any information,but is this possible to do some other filter for psycopg2?