# Can a sql update be done on a table in perspective

**URL:** <https://forum.inductiveautomation.com/t/can-a-sql-update-be-done-on-a-table-in-perspective/59667>\
**Category:** Ignition\
**Tags:** vision, perspective\
**Created:** [May 17, 2022, 2:11pm UTC](https://forum.inductiveautomation.com/t/can-a-sql-update-be-done-on-a-table-in-perspective/59667 "2022-05-17T14:11:15Z")\
**Posts on this page:** 2\
**Page:** 3

<div class="post-metadata">

**Author:** ![ethomason](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ethomason/32/43338_2.png) [@ethomason](https://forum.inductiveautomation.com/u/ethomason)\
**Post date:** [May 18, 2022, 2:51am UTC](https://forum.inductiveautomation.com/t/can-a-sql-update-be-done-on-a-table-in-perspective/59667/41 "2022-05-18T02:51:09Z")

</div>

Did you verify the database is getting updated? That’s where I would start. Also, system.db.runPrepUpdate returns an integer of the number of rows inserted so you can print that to the console to help narrow things down.

---

<div class="post-metadata">

**Author:** ![Glen\_Bennett](https://avatars.discourse-cdn.com/v4/letter/g/3be4f8/32.png) [@Glen\_Bennett](https://forum.inductiveautomation.com/u/Glen_Bennett)\
**Post date:** [May 18, 2022, 12:50pm UTC](https://forum.inductiveautomation.com/t/can-a-sql-update-be-done-on-a-table-in-perspective/59667/42 "2022-05-18T12:50:39Z")

</div>

Thanks again to everyone for the help. Had a few issues to work through with it this morning but I got it working. Here is the final working script.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/1/61c3175d2a5e7229053de687f87d2aa668f76de7.png)

[Previous page](https://forum.inductiveautomation.com/t/can-a-sql-update-be-done-on-a-table-in-perspective/59667.md?page=2)
