# Use system.db.runUpdateQuery with variable value counts

**URL:** <https://forum.inductiveautomation.com/t/use-system-db-runupdatequery-with-variable-value-counts/42658>\
**Category:** Ignition\
**Created:** [January 27, 2021, 3:39pm UTC](https://forum.inductiveautomation.com/t/use-system-db-runupdatequery-with-variable-value-counts/42658 "2021-01-27T15:39:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [January 27, 2021, 4:04pm UTC](https://forum.inductiveautomation.com/t/use-system-db-runupdatequery-with-variable-value-counts/42658/2 "2021-01-27T16:04:19Z")

</div>

I think this post may help you.

> [@Update with IN condition](http://forum.inductiveautomation.com/t/update-with-in-condition/11679/2):
>
> Hi Andrea, By array, do you mean a Python list? This will be my assumption unless you tell me differently. I’d say the problem is that SQL doesn’t understand lists. Try converting the list into a string: system.db.runPrepUpdate("UPDATE TEST SET FL= 1 WHERE ID IN (?)", [str(y)[1:-1]], "dscada\_main") Not that converting a list to string keeps the brackets, so the [1:-1] will remove them. [attachment=0]2016-05-17\_8-14-43.png[/attachment]

---

_[View the full topic](https://forum.inductiveautomation.com/t/use-system-db-runupdatequery-with-variable-value-counts/42658)._
