# Updating multiple rows with same value

**URL:** <https://forum.inductiveautomation.com/t/updating-multiple-rows-with-same-value/16369>\
**Category:** Ignition\
**Created:** [December 19, 2017, 9:26pm UTC](https://forum.inductiveautomation.com/t/updating-multiple-rows-with-same-value/16369 "2017-12-19T21:26:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Micky.Franks](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Micky.Franks](https://forum.inductiveautomation.com/u/Micky.Franks)\
**Post date:** [December 19, 2017, 9:26pm UTC](https://forum.inductiveautomation.com/t/updating-multiple-rows-with-same-value/16369/1 "2017-12-19T21:26:13Z")

</div>

How do I go about updating multiple rows of data in MySql with same values. I have a query which pull multiple rows in a lot and bin. I would like to create a transfer button that changes the rows to a new lot and location. What I have doesn't work on multiple rows.

> system.db.runPrepUpdate("UPDATE roughstorage SET LBin = ?, Llot = ? WHERE LBin = ? and Llot = ?", [newLBin, newLlot, LBin, Llot] , "Progress")

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/debe19acef9c56c2676c3258977801ce808435ab.png)

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [December 19, 2017, 10:47pm UTC](https://forum.inductiveautomation.com/t/updating-multiple-rows-with-same-value/16369/2 "2017-12-19T22:47:31Z")

</div>

I tried a similar query on one of my MsSQL tables and it worked fine: updated 2 different columns across 3 rows.

Does it throw any errors on the client or gateway?

Some other things to check:  
Do you have write access within Ignition? (single updates work?)  
If it’s a Progress OpenEdge DB, is the query syntax any different from standard SQL?
