Is it possible to use Bind variables with Python?
I am using sqlanydb latest release and have tried without success each of the methods mentioned here
my preferred method is pyformat but this raises error:
select something from table where something = %(bindvar)s': b"Syntax error near '%' on line 1"
asked 06 Jan '16, 05:47
sql = "select something from table where something = :bindvar"
In pandas use the list method:
pd.read_sql(sql, db, params=[bindvar])
answered 06 Jan '16, 07:03
You can use the question mark format:
answered 07 Jan '16, 16:03