This is not how bound parameters work in relational databases. Bound
parameters are not Python substitution strings, they are more often
than not processed by the server, or at least have to behave as though
they were. This means you cannot assume a parameter is substituted
inside of a value as you are doing here. The correct syntax for what
you are trying to do is:
s = 'SELECT * FROM Artist WHERE Name LIKE '%' || :pattern || '%'
that is, the concatenation you are doing is explicit in SQL.
>
> Michal
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
>
http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See
http://stackoverflow.com/help/mcve for a full description.
> ---
> You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sqlalchemy+...@googlegroups.com.
> To post to this group, send email to
sqlal...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/sqlalchemy.
> For more options, visit
https://groups.google.com/d/optout.