# Update Perspective Table data to SQL Table

**URL:** <https://forum.inductiveautomation.com/t/update-perspective-table-data-to-sql-table/88975>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 17, 2024, 1:10pm UTC](https://forum.inductiveautomation.com/t/update-perspective-table-data-to-sql-table/88975 "2024-04-17T13:10:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nishant\_Tambe](https://avatars.discourse-cdn.com/v4/letter/n/6a8cbe/32.png) [@Nishant\_Tambe](https://forum.inductiveautomation.com/u/Nishant_Tambe)\
**Post date:** [April 17, 2024, 1:10pm UTC](https://forum.inductiveautomation.com/t/update-perspective-table-data-to-sql-table/88975/1 "2024-04-17T13:10:41Z")

</div>

Hello,

How can I Update Perspective Table data to SQL Table by using runAction Function in onCellEdit  
.

---

<div class="post-metadata">

**Author:** ![DNice](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@DNice](https://forum.inductiveautomation.com/u/DNice)\
**Post date:** [April 17, 2024, 1:21pm UTC](https://forum.inductiveautomation.com/t/update-perspective-table-data-to-sql-table/88975/2 "2024-04-17T13:21:19Z")

</div>

Use the search feature in the forum there are a number of posts related to this already. Here are a few that can help:

> [@SQL update table](https://forum.inductiveautomation.com/t/sql-update-table/14300):
>
> Hi, I have a data set pulled into ignition tag that updates every 24hrs( I don’t have permission to access that DB and this is the only way I can get that dataset). I would like to save the dataset into my DB and update it every 24hrs to reflect the changes that occurred in the last 24 hrs, what would be the best way to do such thing? I was thinking maybe a procedure that will delete the old table and write the new data, perhaps there is a better way? Oh the reason I want that data in my DB i…

> [@Needs to update perspective table using SQL query through scripting](https://forum.inductiveautomation.com/t/needs-to-update-perspective-table-using-sql-query-through-scripting/53832):
>
> One customised table was designed for some functions. That table data property is bound to an SQL query so that the SQL data can be monitored in the table itself. Now I want to update the SQL data from the table by selecting the table row. I have attached the file for your reference. As per my design, once I select any row in the table, the selected row’s data will show in the text field. Once I made some changes to the existing data, I needed to press the update button to update the table data.…

---

<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:** [April 17, 2024, 1:22pm UTC](https://forum.inductiveautomation.com/t/update-perspective-table-data-to-sql-table/88975/3 "2024-04-17T13:22:59Z")

</div>

You have to write a jython script that runs the appropriate SQL UPDATE statement.

That script will be highly specific to your needs. Here are some topic that discuss this (and have samples):

[https://forum.inductiveautomation.com/search?q=%20oneditcellcommit%20script%20sql%20order%3Alatest](https://forum.inductiveautomation.com/search?q=%20oneditcellcommit%20script%20sql%20order%3Alatest)

Keep in mind the values from the table available to you in such a script:

> **[Perspective - Table Scripting | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-table/perspective-table-scripting#oneditcellcommit)**
>
> This page details the various scripting, component, and extension functions available for Perspective's Table component.
