I use the following code in Python (with pyodbc for a MS-Access base).
cursor.execute(\"select a from tbl where b=? and c=?\", (x, y))
It\'
Write the sql string and then execute it:
sql='''select a from tbl where b=? and c=? ''' cursor.execute(sql, x, y) print 'just executed:',(sql, x,y)
Now you can do whatever you want with the SQL statement.