# Update with IN condition

**URL:** <https://forum.inductiveautomation.com/t/update-with-in-condition/11679>\
**Category:** Ignition\
**Created:** [May 17, 2016, 8:20am UTC](https://forum.inductiveautomation.com/t/update-with-in-condition/11679 "2016-05-17T08:20:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 17, 2016, 12:58pm UTC](https://forum.inductiveautomation.com/t/update-with-in-condition/11679/3 "2016-05-17T12:58:22Z")

</div>

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")`

---

_[View the full topic](https://forum.inductiveautomation.com/t/update-with-in-condition/11679)._
