You cannot pass a list into a single ‘?’ substitution parameter. Jordan’s suggestion would be suitable in your case if you use ‘%s’ instead of ‘?’ and use the non-Prep form of the query.
When using data types in a list that would be problematic when converted to a string, you must place one ‘?’ for each element of list. Like so:system.db.runPrepUpdate("UPDATE TEST SET FL= 1 WHERE ID IN (%s)" % (", ".join(['?'] * len(y))), y, "dscada_main")
1 Like